|
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
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
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
|
|
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
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
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
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
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
|
|
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!
|
|
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?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
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.
|
|