问题描述:

I have a web page which offers file upload and returns a report.

Is it possible to change the file in the background and then re-upload the same file using AJAX without choosing it in the upload form field?

网友答案:

No. The user would have to re-select and re-upload the file.

That said, the idea doesn't really make sense to me.

Why not simply keep the uploaded file on server side, assign it a unique ID, and pass that around in your forms? Should the uploaded file be needed again, you can retrieve it using that ID without having to re-upload it.

相关阅读:
Top