从Windows上传图片到Amazon S3桶8商店应用程序(使用Javascript)上传图片、应用程序、商店、Windows

2023-09-11 08:44:28 作者:我执笔墨绘你倾城颜°

看来,Amazon S3的.NET SDK是不支持的,因为在WinRT.Is一些限制,有没有其他的工作,各地在Windows 8商店应用程序?如果我使用REST API,我可以用WinJS.xhr函数来调用和处理Web服务?

It seems that amazon S3 .NET SDK is not supported in windows 8 store apps because of some restrictions in WinRT.Is there any other work around? In case I use REST api, can i use the WinJS.xhr function to call and process the web service?

推荐答案

这将与REST API。 退房:

This will work with the REST api. Check out:

Uploading图像到Amazon S3使用HTML,JavaScript的&放大器; jQuery的使用Ajax请求(无PHP)

http://aws.amazon.com/articles/1434

请注意,在WinJS你不必处理CORS这里HTML / JS Windows应用商店的应用程序没有,你在浏览器中的跨域限制。

Note that in WinJS you DO NOT have to deal with CORS here as HTML/JS Windows Store apps do not have the cross domain restriction that you have in the browser.

http://docs.aws.amazon.com/AmazonS3/最新/ API / RESTObjectPUT.html

您也可以使用招的作曲家测试了这一点( http://fiddler2.com/ ),以确保您有正确的请求,然后重新创建你的JavaScript

You can also test this out using Fiddler's composer (http://fiddler2.com/) to ensure you have the proper request and then recreate in your JavaScript