File deleted shortly after azure blob upload!?

5 posts, 1 answers
  1. Pete
    Pete avatar
    14 posts
    Member since:
    May 2009

    Posted 15 Apr 2014 Link to this post

    Hi,

    I've got the cloud uploader configured using the custom azure provider so that I can dynamically switch containers and the http handler setup so that I can set a custom file name for files that I upload. This seems to all be working, the file gets uploaded with the correct file name to the correct container (and the cloud upload control has the green tick next to the file - no errors), but after a second (or so) it gets deleted. I can't figure out why.

    I checked the azure blob log and can see the following sequence of events:
    (time - command)
    03:16:20.25 - PutBlob
    03:16:30.17 - SetBlobMetadata
    03:16:32.48 - DeleteBlob

    All of these commands are for the custom container/file name I've set, originate from the same IP address (which is my IP address) and all result in a success.

    Does anyone have any idea as to why the cloud uploader would be sending a delete command?

    I'm not, knowingly, telling the cloud control to delete the file. I'm certainly not clicking the delete (trash can) image next to the uploaded file.

    Thanks,
    Pete
  2. Pete
    Pete avatar
    14 posts
    Member since:
    May 2009

    Posted 16 Apr 2014 Link to this post

    Ok, I've figured out that this is caused by not setting the UncommitedFilesExpirationPeriod property of the custom azure provider. It seems the property was set to 0. I'm not sure why - according to the documentation the default time is 4 hours (see http://www.telerik.com/help/aspnet-ajax/p_telerik_web_ui_azureprovider_uncommitedfilesexpirationperiod.html ). This meant the file was deleted moments after uploading.

    Now I've just got to figure out what makes a file 'uncommitted' or 'unprocessed' because the files I was uploading required no further
    processing or changes. According to the documentation setting UncommitedFilesExpirationPeriod affects "The time after the files are
    deleted from the storage if they are not processed."

    Can anyone please shed some light on what 'processing' a file involves? Is it an azure internal action? Is it to do with reassembling a chunked upload? Why should the uploader be deleting files after any kind of time-out?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 18 Apr 2014 Link to this post

    Hello Pete,

    In case that you are overriding the Initialize method of the provider the UncommitedFilesExpirationPeriod should be set explicitly, because in the base implementation of the method the property is set to 4 hours.
    By "processed" we mean when the user postbacks the page and in the FileUploaded event the file is not set as invalid. This is applicable when the event is handled otherwise all files should be considered as "processed" after a postback.
    We are going to update our documentation according to your feedback.

    Regards,
    Peter Filipov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  5. Pete
    Pete avatar
    14 posts
    Member since:
    May 2009

    Posted 21 Apr 2014 in reply to Peter Filipov Link to this post

    Hi Peter,

    Thank you for clarifying that for me.

    My current page design requires no postback by the user once the files are uploaded. In fact, the user may close or leave the page by any number of means once the file has finished uploading. From what I can tell, under the current way this control works, it seems the files will be deleted after my timeout elapses. Is there a way to mark these files as valid/processed without a postback?

    Thanks,
    Pete
  6. Answer
    Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 23 Apr 2014 Link to this post

    Hi Pete,

    Please override the DeleteFile method with empty implementation:
    public override void DeleteFile(string keyName)
    {
    }

    The above method is called by the callback mechanism that we use to delete the unprocessed files.

    Regards,
    Peter Filipov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017