简体   繁体   中英

Custom file upload button

spent hours on end searching the net but it seems im looking for one thing and finding another, either that or what i want just cannot be done. i do not want to re-style the <input type="file"> i want to create a custom button that brings up a browse window, lets the user select a file of certain types, populates a seperate text box with the file name and stores the rest of the information in a way that could be passed to a php upload script after the user has filled in the rest of the form. So in other words i want to re-invent the <input type="file"> .

This can't be done in regular html, but possible to do using flash or silverlight etc. You might want to have a look at Plupload , which is a fairly foolproof upload solution in my opinion.

http://www.uploadify.com/demos/

Uploadify is a powerful and highly-customizable file upload script. In its simplest form, Uploadify is easy to get up and running with minimal effort and little coding knowledge.

Uploadify can also be modified to suits the needs of more advanced developers via the arsenal of custom options that are available.

http://www.uploadify.com/documentation/

buttonImg parameter: we can give the image/text which we wanted to show ie we can customize browse button.

This is not possible, the browse button is implemented in a very secure way, not allowing it to be styled or to do any tricks with it. This is because it could in some way allow the developer to trick the user in uploading a different file then intended.

in simple php its possible. try this +Create Album

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM