Uploading and downloading files using wcf data services?

流过昼夜 提交于 2020-01-03 05:59:10

问题


I have been trying to find information regarding if it is possible to upload and download files using WCF Data Services (formerly ADO.NET Data Services), but haven't been able to make any leads due to perhaps less help content available on wcf data services on the web as of now.

Is it possible for us to write a wcf data service so that client can post to the following URI to upload a file - http://some-restfulwebservice/Files/upload

and this url to download the fie - http://some-restfulwebservice/File('XYZ.txt')/download

Any good examples/sample code? Any help or direction would be appreciated?


回答1:


Astoria supports something very much like this through something called Media Link Entries.

I am working on samples to help here at the moment, but it will take me a few more weeks probably

Check out IDataServiceStreamProvider in the meantime.

And check back on my Custom Data Service Providers series in a week or two.

Hope this helps

Cheers

Alex

Data Services Team - Microsoft.



来源:https://stackoverflow.com/questions/2042025/uploading-and-downloading-files-using-wcf-data-services

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!