[nycphp-talk] "Approach Review" for storing $_FILES in session variable and using later
Mark Armendariz
nyphp at enobrev.com
Tue Jun 8 16:57:34 EDT 2004
> What I'm looking for is a "code review" or an "approach
> review" as to whether or not I handled this request properly
> inasmuch as storing $_FILES into a session variable and
> retrieving it later to allow the user to upload a file and
> submit data anytime they want to on it. This would help me
> moreso than a solution at this point to the
> is_uploaded_file() problem (though that's always welcomed too!)
>
> Thanx
> Phil
Well, from what I know, the temporary uploaded file is deleted as soon as
the form request is finished, which would make the file info in the session
no longer valid upon the next page load (I may be wrong in this). I'd
recommend storing the file in your own temporary directory and adding it's
location to your file db. Then once the user finishes the details form,
move the file to the permanent location and update the meta data, or remove
it accordingly.
Mark
More information about the talk
mailing list