You need to sign in to do that
Don't have an account?

Input File Example
Hi,
This is anji salesforce dEVELOPER........
Can u tell me the code for "Input File" ..............
How to insert image into Registration form using InputFile ................?
Please send me the code ..................
thanking you,
Anjireddy
It sounds like you are looking for the apex:inputFile component - this allows you to upload files as attachments to records etc.
There's an example of using this in one of my blog posts at:
http://bobbuzzard.blogspot.com/2011/01/uploading-multiple-attachments-via.html
Hi Bob,
I would like to bring your attention to this StackExchange Question.
It is regarding preventing Large Files attempting to upload to Salesforce via Visualforce
Do you have a simple tweak that might answer this quickly.
https://salesforce.stackexchange.com/q/294115/38277
Code snippets included
Hi Bob,
Checking your blog out, this one refers to attachments rather than files:
http://bobbuzzard.blogspot.com/2014/09/check-file-size-on-upload-in-visualforce.html
I will see if this helps me.
Pre Checking File Size
https://stackoverflow.com/questions/3717793/javascript-file-upload-size-validation
Here is the additional JS:
var input, file;
input = document.getElementById('page:form:fileinput');
file = input.files[0];
var size = file.size;
document.getElementById('page:form:size').value = size;