开发者

SESSION with a form file

开发者 https://www.devze.com 2022-12-11 08:23 出处:网络
Say if I upload a file on page开发者_Python百科 1 and submit the form How can I make a session with the file which has been uploaded

Say if I upload a file on page开发者_Python百科 1 and submit the form

How can I make a session with the file which has been uploaded

for example

how would I get the session to store the file ?


You can store the file somewhere temporary and keep the path in the session. once the user completes whatever he/she supposed to complete then you store the file to a permanent location.

Your best bet is to store the location of the file in the session. better ideas?


A file cannot be stored in the session past the initial submit. On the file that the form calls you will need to take the temporary file and move it to a directory on your server.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号