I'm using pluploader
with Laravel, and on my administrative the way it works when creating a new article is doing the following steps:
- Type the details required to create new article
- Select the photos to upload for the article
- When
Create
button is clicked, the following actions are done:- Save the upload details for each photo in a session array. That means that if 3 files are to be uploaded, each upload has an individual POST action
- Once the photos have been saved in that session array, it creates the record in the database for the article
- It sends the
id
of the article created to a function which should get the photos and move them to their folder, and add the photo record in the database
Now, the problem is that with each POST
the tmp_filename
, the temporary file, is deleted so when it tries to actually move the photo... there is no photo to move.
Am I right, and if so, how can I work around that issue? Any way of retaining the tmp deletion until X function has ended?