This is a migrated thread and some comments may be shown as answers.

Files uploaded in previous postback are still being uploaded

2 Answers 68 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Akinola
Top achievements
Rank 1
Akinola asked on 23 Jul 2012, 07:18 PM
RadAsyncUpload isnt being consistent with the uploaded files. Attimes, it attempts to upload files that were uploaded in a previous upload, and attimes, it uploads the same file 2ce. I'm not sure what I causing the weird behaviour, but I need some help on this. Any suggestions?

It seems like when an upload is complete, the files uploaded are still being stored in the control somehow, so when a user tries to do a new upload, the files previously uploaded attempt to be uploaded again. What do I need to do to clear out already uploded files. I have ensured that the uploaded temporary files in the RadUploadtemp folder are cleaned out.


Thanks,
Akin

2 Answers, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 26 Jul 2012, 10:49 AM
Hi Akinola,

Are you using RadAjaxManager or an UpdatePanel in the page where this behavior occurs. In either case, could you send a simplified page that reproduces the issue, so that we can investigate it locally in order to pinpoint the reason for this behavior.
 
Greetings,
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Vadim
Top achievements
Rank 1
answered on 28 Jul 2012, 04:33 AM
Hi,
at the risk of sounding impolite, I'd like to ask a quick question, which I think is related to the problem:
Setup:
aspx page
- updatePanel
-- checkbox AutoPostBack
-- submit button (asp.net)
-- RadAsyncUpload (1 file limit, no targetFolder configured, _FileUploaded handler implemented to save file )

Scenario:
- select and upload file in RadAsyncUpload
- checkbox (checked)
-- postback fired
---_FileUploaded processed <-[problem 1]
---UpdatePanel refreshed - RadAsyncUpload is reset <- [problem 2]
-submit clicked
---_FileUploaded fires again tries to move file from temp to target, file not found ......<- [problem 3, result of 1 and 2]

Problem: checkbox triggered submit, not the submit button, causing resets and file issues with AsyncUpload

Question: Is it possible to use RadAsyncUpload inside UpdatePanel while other controls can cause page postback (without loosing state and preventing firing _FileUploaded on each partial postback?

Thank you.

EDIT: FOUND ANSWER - using PostBackTriggers setting for RadAsyncUpload
http://www.telerik.com/help/aspnet-ajax/asyncupload-persist-uploaded-files.html

if PostBackTriggers setting is not congured, then _FileUploaded fires on EVER postback triggered from UpdatePanel controls.
But if you specify at least 1 "true submit" form control in PostBackTriggers, the _FileUploaded fired only for that control.
Tags
AsyncUpload
Asked by
Akinola
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Vadim
Top achievements
Rank 1
Share this question
or