Random inability to save uploaded files to disk

1 view
Skip to first unread message

Alexander Obuhovich

unread,
Apr 13, 2010, 10:11:49 AM4/13/10
to In-Portal Bugs
Flash uploader uses temporary folder to store uploaded files until user hits Save toolbar button. In that temporary folder files are named like this:
uploader_flash_<control_number>_<file_number>_<original_file_name>

This way, when 2 users select same file (same name) for upload on same edit page, then they are merged together and only one user will be able to use this file at the end.

I propose to generate temporary name for each uploaded file after file is uploaded to server (in OnUploadFile event) using "tempnam" php function and return it to js uploader part. Then, when user hits "Save", then js uploader will submit original file name and it's temporary name (does that already) so problem will be eliminated.

Also it may be a good idea to clean up "/system/tmp" folder after upload is made, so we don't store files, that were uploaded 1 day ago and were never used since then.

--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com

Dmitry Andrejev

unread,
Apr 13, 2010, 11:11:24 AM4/13/10
to in-port...@googlegroups.com
Hi Alex,

1. I agree about naming the tmp files.

2. File clean up - I guess we can/should use the same Agent we have for Images in place?

DA.

--
You received this message because you are subscribed to the Google Groups "In-Portal Bugs Team" group.
To post to this group, send email to in-port...@googlegroups.com.
To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/in-portal-bugs?hl=en.

Dmitry Andrejev

unread,
Apr 14, 2010, 10:56:19 PM4/14/10
to in-port...@googlegroups.com
I had a quick check - sounds like we should do within "OnUploadFile" method were we save to tmp/?

DA.

Alexander Obuhovich

unread,
Apr 15, 2010, 3:40:15 AM4/15/10
to in-port...@googlegroups.com
That's exact same place as I've proposed. I also agree of course.

Dmitry Andrejev

unread,
Apr 16, 2010, 6:08:35 PM4/16/10
to in-port...@googlegroups.com
Excellent!

I guess we can add this to In-Portal 5.0.4, what you guys think?

Once confirmed - I'll create a task for it.


DA.

Alexander Obuhovich

unread,
Apr 17, 2010, 5:59:34 AM4/17/10
to in-port...@googlegroups.com
Have you seen amount of tasks, that are scheduled for 5.0.4 already? I'll say we need to review all tasks for 5.0.4 and move most of them to Future, sine mostly 5.0.4 release is slowing down 5.1.0 release.

Dmitry Andrejev

unread,
Apr 17, 2010, 8:27:43 PM4/17/10
to in-port...@googlegroups.com
Yes, it's a lot and we'll definitely should revise them.

Here is the task (put in Future for now)

703: Improve Flash Uploader to generate random names during initial upload to filesystem


DA.
Reply all
Reply to author
Forward
0 new messages