Files uploaded in previous postback are still being uploaded

3 posts, 0 answers
  1. Akinola
    Akinola avatar
    4 posts
    Member since:
    Mar 2012

    Posted 23 Jul 2012 Link to this post

    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. Bozhidar
    Admin
    Bozhidar avatar
    1188 posts

    Posted 26 Jul 2012 Link to this post

    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.
  3. Vadim
    Vadim avatar
    3 posts
    Member since:
    Jul 2010

    Posted 27 Jul 2012 Link to this post

    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.
Back to Top