CTOlet / yii2-attachments

Yii2 extension for uploading and attaching the files to the models
66 stars 57 forks source link

Files not always linking to correct models #9

Closed aplatonov7 closed 9 years ago

aplatonov7 commented 9 years ago

Thank you for the great extension. Sadly, I encountered one quite annoying bug. Here is an example: user uploads some files while creating an Object A, but then decides to cancel the creation of this object (i.e. user just closed the form without pushing "Create" button). This user then decides to create some other Object B with attachment files. After he creates Object B, it will contain not only the files user uploaded while creating Object B, but also files, that were uploaded during the creation of Object A.

I do believe this is happening because temp files directory name is generating from user's current session, so it is not unique for each individual process.

CTOlet commented 9 years ago

Fixed. Now all temp files just will be deleted composer update