![how to upload file in silverlight sample how to upload file in silverlight sample](http://az414997.vo.msecnd.net/wordpress/2009/11/OutOfBrowser.png)
Do you have an updated version of this - I'm needing to upload large files to S3 from Silverlight. It doesn't contain a contentlength, and GetRequestStream() and GetResponse() are not in Silverlight 2.0. I've replaced the NameValueCollection with Dictionary instead, which will probably be ok, but now there are problems with the HTTPWebRequest not working.
![how to upload file in silverlight sample how to upload file in silverlight sample](https://origin2.cdn.componentsource.com/sites/default/files/styles/carousel_main/public/images/product_screenshot/xceed/xceed-upload-silverlight/img_462221.png)
This code doesn't work with Silverlight 2.0 it seems. String resultQuery = HttpUploadHelper.Upload(url, files, form) įor SilverLight, Asynchronous methods should be use BeginGetResponse, EndGetResponse etc. NameValueCollection form = new NameValueCollection() įorm = "14365123651274" įorm = "zzzzzzzzzzzzzzzzzzzzzzzz" įorm = "zzzzzzzzzzzzzzzzzzzzzzzzz" UploadFile uf = new UploadFile("file.txt", "file", "txt/html") // file should be in bin directory
How to upload file in silverlight sample how to#
So, I've written a custom class which will generate the request contents in "multipart/form-data" format.īelow is the code how to use that custom class and upload to the amazon S3 directly using C#/SilverLight So, HttpWebRequest class can be configured so that it will send the request in the required format. That method is not acceptable when you want to upload the file(s) programatically using any programming language such as C# or by using the Silverlight.Ĭ# doesn't provide the support of "multipart/form-data" form posting which is required to upload directly to the S3.
![how to upload file in silverlight sample how to upload file in silverlight sample](https://docs.telerik.com/devtools/silverlight/controls/radupload/features/images/RadUpload_Features_Overwriting_Existing_Files_01.png)
There are scenarios when you want to directly upload the file from the client browser/application to S3.Īmazon provides simple POST method to upload files to amazon File Upload.