How to get uploaded files after form submit using uploadify?

有些话、适合烂在心里 提交于 2019-12-06 10:05:21

Using javascript you can add some inputs to your form to trace the uploaded files. For example you can put:

<input type='hidden' name='files[]' value="FILENAME1">
<input type='hidden' name='files[]' value="FILENAME2">
<input type='hidden' name='files[]' value="FILENAME3">

Remember that uploadify has an onComplete event that can return data back from your 'script' parameter.

So, when uploadify passes the file off, you can then have the script return the path to the file storage location, and then retrieve/store it in your form based on what was passed back in the onComplete event. (This would be the response portion of the onComplete callback)

From there, you can populate hidden form fields that are them submitted with the form (as AurelioDeRosa has demonstrated) and populated with the response value(s).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!