从Windows上传图片到Amazon S3桶8商店应用程序(使用Javascript) [英] uploading images to amazon s3 bucket from windows 8 store app(Javascript)

查看:184
本文介绍了从Windows上传图片到Amazon S3桶8商店应用程序(使用Javascript)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看来,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:

<一个href="http://stackoverflow.com/questions/11240127/uploading-image-to-amazon-s3-with-html-javascript-jquery-with-ajax-request-n">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

这篇关于从Windows上传图片到Amazon S3桶8商店应用程序(使用Javascript)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆