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

RadCloudUpload1.FileUploaded Not firing

3 Answers 125 Views
CloudUpload
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 08 Aug 2015, 01:41 AM

Hello,

 

1) Is there a way to do an automatic post-back when files finish uploading without the user having to click on a button? I am trying to save uploaded file information to database for further processing. The event doe not seem to be firing.

 

Thanks.

 

3 Answers, 1 is accepted

Sort by
0
Accepted
Hristo Valyavicharski
Telerik team
answered on 10 Aug 2015, 05:30 AM
Hi John,

Try to cause postback after file is uploaded:

<telerik:RadCloudUpload runat="server" ID="cloudUpload" OnClientFileUploaded="fileUploaded"   ProviderType="Amazon" ></telerik:RadCloudUpload>

function fileUploaded(sender, args) {
    theForm.submit();
}

Then the server OnFileUploaded event should be fired.

Regards,
Hristo Valyavicharski
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
John
Top achievements
Rank 1
answered on 10 Aug 2015, 07:24 AM
Thanks. That works perfectly!
0
Soumen
Top achievements
Rank 1
Veteran
answered on 21 Sep 2020, 11:08 AM

Hello, I need the same thing. My scenario(1) is multiple file upload and save to Database. I have added OnClientFileUploaded event. but in my case if I select 10 files at a time, only 1 or 2 file is getting uploaded to S3 server and RadCloudUpload1_FileUploaded is firing several times with the same file name.Rest of the files are not uploading.

And scenario(2) is if I am removing OnClientFileUploaded  then all the files are uploaded to server but RadCloudUpload1_FileUploaded is not firing. Please help how to resolve ?

 

<telerik:RadCloudUpload ID="RadCloudUpload1" runat="server" MaxFileSize="91943040" RenderMode="Lightweight" MultipleFileSelection="Automatic" OnClientFileUploaded="fileUploaded" OnFileUploaded="RadCloudUpload1_FileUploaded" ProviderType="Amazon"></telerik:RadCloudUpload>

function fileUploaded(sender, args) {
          theForm.submit();    
        }

 protected void RadCloudUpload1_FileUploaded(object sender, CloudFileUploadedEventArgs args)
    { 
        string keyName = args.FileInfo.KeyName;
        string originalName = args.FileInfo.OriginalFileName;
        args.IsValid = true;       
    }

<httpRuntime maxRequestLength="91943040" executionTimeout="3600" />

Tags
CloudUpload
Asked by
John
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
John
Top achievements
Rank 1
Soumen
Top achievements
Rank 1
Veteran
Share this question
or