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

File deleted shortly after azure blob upload!?

6 Answers 517 Views
CloudUpload
This is a migrated thread and some comments may be shown as answers.
Pete
Top achievements
Rank 1
Pete asked on 16 Apr 2014, 03:33 AM
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

6 Answers, 1 is accepted

Sort by
0
Pete
Top achievements
Rank 1
answered on 16 Apr 2014, 10:07 PM
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?
0
Peter Filipov
Telerik team
answered on 18 Apr 2014, 11:42 AM
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.

 
0
Pete
Top achievements
Rank 1
answered on 21 Apr 2014, 10:52 PM
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
0
Accepted
Peter Filipov
Telerik team
answered on 23 Apr 2014, 09:51 AM
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.

 
0
Michael
Top achievements
Rank 1
answered on 23 Jan 2017, 04:52 PM
Having Similar issue with s3 upload,  Where would i implement is override of the delete
0
Veselin Tsvetanov
Telerik team
answered on 26 Jan 2017, 08:49 AM
Hi Michael,

The DeleteFile calback is defined in the AmazoneS3Provider class. In order to override it, you will need to implement a Custom provider, which inherits the AmazoneS3Provider and insert the empty implementation of the DeleteFile() method in that class. Then the custom provider should be registered in the web.config of the application and the RadCloudUpload should have its ProviderType set to the new custom provider.

Regards,
Veselin Tsvetanov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
CloudUpload
Asked by
Pete
Top achievements
Rank 1
Answers by
Pete
Top achievements
Rank 1
Peter Filipov
Telerik team
Michael
Top achievements
Rank 1
Veselin Tsvetanov
Telerik team
Share this question
or