Welcome Guest Search | Active Topics | Sign In | Register

AJAXUploader1.ClearPostedFiles() Options
Stan92
Posted: Friday, November 16, 2007 1:59:56 PM
Rank: Member
Groups: Member

Joined: 11/15/2007
Posts: 26
Do I miss something ?
When I perform a ClearPostedFiles() the "Delete" button doesn't display (so that works), but I still can view the different files (with their checkboxes).
In fact, it seems there's a kind of cache problem (when I press F5), the list becomes empty.


eo_support
Posted: Friday, November 16, 2007 2:11:01 PM
Rank: Administration
Groups: Administration

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

You can use the following code to disable the cache:

Response.Cache.SetCacheability(HttpCacheability.NoCache)

Cache are controled by ASP.NET, not the control. So if ASP.NET caches the page, our code wouldn't even be called.

Thanks
Noah Heldman
Posted: Tuesday, February 26, 2008 7:19:24 PM
Rank: Newbie
Groups: Member

Joined: 8/30/2007
Posts: 7
I had the same problem as the original poster.

I tried adding Response.Cache.SetCacheability(HttpCacheability.NoCache) to my content page's Page_Load, but it does not clear the list of posted files on the web page.

I read elsewhere that if I am running master pages, the Response.Cache.SetCacheability must be added to the Page_Load of the master page, but that does not work for me either.

I am submitting a form which includes the AJAXUploader control, and using an EO Dialog (server-side) to display confirmation that submit was successful. The form sits in an asp:UpdatePanel, but I can't see a programmatic way to clear the list of posted files.

Please tell me there is a way to clear that list of posted files without refreshing the page!

Thanks,
Noah
eo_support
Posted: Tuesday, February 26, 2008 7:48:15 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,093
Hi Noah,

Check what files you have in your TempFileLocation. The temp .dat file should be deleted by ClearPostedFiles. So check that after you call ClearPostedFiles. If you still see the files on in that directory after you call ClearPostedFiles, the files might be locked by somebody else. In that case you need to find out who is locking it. In either case, try the same code with a simple blank page and then gradually put other elements in. That way you can at least find out what triggered it.

Thanks
Noah Heldman
Posted: Tuesday, February 26, 2008 8:47:27 PM
Rank: Newbie
Groups: Member

Joined: 8/30/2007
Posts: 7
I have confirmed that all files (.data, .info, and .status) disappear from the TempFileLocation as soon as I call ClearPostedFiles().

However, the files still appear on my web page in the posted files section. Exactly what is required for that list of files to be cleared?

Thanks,
Noah
eo_support
Posted: Wednesday, February 27, 2008 6:13:12 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,093
Hi Noah,

That appears have to do with your UpdatePanel, it seems to have failed to update our uploader. First try to remove the UpdatePanel to see if it works, then try it with our CallbackPanel. If no luck with either, please create a simple test page that demonstrates the problem (do not post your full page as is because most likely we won't be able to run it) and we will take a look to see what caused it.

Thanks


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.