Welcome Guest Search | Active Topics | Sign In | Register

uploader temp files Options
dmacchia
Posted: Monday, October 15, 2007 1:25:26 PM
Rank: Member
Groups: Member

Joined: 10/15/2007
Posts: 23
Hi. I am evaluating your control suite. More specifically, I am looking into your AJAXUploader component. I understand that the uploader will always upload to a temp directory. After which I will handle the file as necessary (i.e. move, rename, etc.).

Meanwhile, can you shed some light on the 3 temp files that are created (.data, .info, .status)? What do each do? Can we access them? How do I delete all the files?

Thanks.

David
eo_support
Posted: Monday, October 15, 2007 1:33:25 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,086
Hi David,

You only need to care about the .data file. The other two files are used by the uploader internally. For example, the client side file name is stored in the .info file. All three files will be automatically deleted by the uploader. So if you moved .data file to somewhere else, then you got to keep it; otherwise it will be deleted by the uploader.

Thanks
dmacchia
Posted: Monday, October 15, 2007 2:25:36 PM
Rank: Member
Groups: Member

Joined: 10/15/2007
Posts: 23
Thanks for the quick reply.

I will be taking the data file and FTP-ing it from one hosted provider to another. So I am actually moving the file after upload and then renaming it at the same time it is moved. However, it seems as if the .info and .status files are remaining in the temp directory and are starting to stack up. At what point are the temp files automatically deleted?

Also, are the temp names generated to be unique?

David
eo_support
Posted: Monday, October 15, 2007 2:36:50 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,086
Hi,

Make sure that you do not hold a reference to the AJAXPostedFile object anywhere. As long as a reference is held on that object, the underlying file corresponding to that object won't be deleted. Once all references are gone, the files should be deleted within an hour.

Also make sure you use the latest build (2007.1.43). We have fixed several issues related to uploader during the past, one of them is related to temp file deleting.

And yes. The temp names generated contain a GUID. So they are always unique.

Thanks
eo_support
Posted: Monday, October 15, 2007 2:50:26 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,086
Hi David,

Also make sure that nobody "touches" those .info and .status file. Those files won't be deleted if their last accessed time is very recent (within an hour or so). So if some other programs keep scaning those files, they won't be deleted either.

As an alternative, you can always call ClearPostedFiles after you've moved your .data file. That way it will force the uploader to delete those temp file earlier.

Thanks
dmacchia
Posted: Monday, October 15, 2007 3:19:01 PM
Rank: Member
Groups: Member

Joined: 10/15/2007
Posts: 23
Ah, I think the ClearPostedFiles method is probably what I was looking for. If it were a snake it would have bit me.

Thanks!
dmacchia
Posted: Thursday, November 22, 2007 8:49:49 AM
Rank: Member
Groups: Member

Joined: 10/15/2007
Posts: 23
OK, I renamed the .data file and then called the ClearPostedFiles method (as suggested). This did not remove the other two files. Am I missing something?
eo_support
Posted: Thursday, November 22, 2007 8:59:36 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,086
Those files may not be removed immediately. But you do not need to worry about them. They will be automatically deleted eventually. Many people have asked about this and have verified that they will be eventually deleted.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.