ASP.NET Uploaded File

后端 未结 4 1589
甜味超标
甜味超标 2021-01-15 19:55

I have an ASP.NET web application that uses jQuery on client side. On one of the web forms I have a bunch of controls to fill, and an upload control. User can run upload whi

4条回答
  •  无人及你
    2021-01-15 20:50

    Like other people mentioned - you can simply upload it. You can do it in many ways:

    1. Upload the files in a temporary folder, and when they finally say save or complete - you can move the file from that temp folder to the other folder where you'd usually keep regular files.
    2. One more thing that you can do, whenever the user clicks on upload button for temporary files, is that you can check you temp folder and clear other files which have stayed there for more than 1-2 days/weeks so that way you know for sure you are not wasting space.

    Perhaps, you can also have a timer on your website that regularly cleans up this folder. I'd say this is more efficient and you don't have to wait for users to come in and click on upload button to clean up your space.

提交回复
热议问题