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

Client-side

3 Answers 50 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Andrea
Top achievements
Rank 1
Andrea asked on 26 Nov 2008, 03:45 PM
I would like to elaborate file client side before snding it to server. How can I do it? 

3 Answers, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 02 Dec 2008, 02:13 PM
Hi Andrea,

Yes, you can modify the file on the client side before sending it. The easiest way to do this is to handle the FileUploadStarting event. There you have the original file and you can choose what the actual uploaded stream will be by setting the NewFilestream property.

void upload_FileUploadStarting(object sender, FileUploadStartingEventArgs e)     
{     
    var selectedFile = e.SelectedFile.File;     
    
    // set the new file steam to whatever you like:     
    //e.NewFileStream = ....     
}    
 

Greetings,
Miroslav
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Gurpreet Singh
Top achievements
Rank 1
answered on 17 Oct 2012, 06:41 AM
Hi,

I am using RadUpload.
I just want to access file content on client side.
Can I use RadUpload control without setting UploadServiceUrl (without handler file) ?


How can use RadUpload control on client side only to access file content ?

Thanks,
Gurpreet
0
Tina Stancheva
Telerik team
answered on 17 Oct 2012, 08:39 AM
Hi Gurpreet,

The RadUpload control is designed to allow you to easily select and upload files on a server. This is why in your case, it might be better to use the OpenFileDialog to open a file on the client and manipulate it as you need to.

All the best,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Upload
Asked by
Andrea
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
Gurpreet Singh
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or