Trending News
Home / Web Development / HTML / Display name,size,type of a file uploaded( image, text, pdf, spreadsheet etc)

Display name,size,type of a file uploaded( image, text, pdf, spreadsheet etc)

Hi Friends,
Today,I’m trying to display the name, size and type of a file uploaded. Mainly here I explains how to get the file name, file size (in bytes), file type (Image/Text/PDF/spreadsheet files) after select the documents.
Uploading the files in php page using ‘file’ type in HTML input like <input type=”file” name=”image”/>. Some times we may need to know the file name,type and size of the file that is uploaded.
Here is give a simple method to get the file name, type and size of the file that is being uploaded in pure php page.



Basically when the user selects any files using input file tag we will display its file name, file size and file type of files selected.




Description: Here we first add a input file tag and button within form tag. If we select the files then it display name,size and type of file selected. Using Html5 we can also preview image preview image

DEMO

Loading Facebook Comments ...
Social Media Auto Publish Powered By : XYZScripts.com