I want to implement file upload in RESTful way using openrasta but not able to find proper way to implement it.There are few ways like using Ajax file upload or using Iframe which i could find.
Can anybody suggest any way of doing this or provide me some resources from where i can refer.
Thanks in advance
It seems to me you're trying to build file uploading in an html environment.
You have two choices.
Use an HTML form to upload the file.
<form enctype="multipart/form-data" action="/files" method="post">
<fieldset>
<input type="file" name="filename" />
<input type="submit" />
</fieldset>
</form>
You can map that in OR very easily. Your handler would look like this:
public object Post(IFile filename) { /* do something with the file */ }
You can't do ajax-based file upload with progress bars as there is no way in pure xmlhttprequest to manipulate binary files. If you go down the route of using a flash / silverlight control behind the scene, you'll just need to make sure you post the content of the file to /files
as in the previous example, the easiest way being to send the content with a Content-Type http header of application/octet-stram, and the same handler code will just work.