5 ms·
Asynchronous CORS uploads to S3 and GCS using .NET
- exodust 14y agoNicely done, well explained. I made a web app recently and tried CORS and Amazon S3 for the first time. Very surprised and pleased with the results. I'm reading and writing JSON files to the bucket, and it must be said - very snappy and responsive! Also it's nice to work with straight JSON rather than messing around with JSONP. The web app I made is for a company's internal network, so I didn't need to worry about older browsers. That's the only drawback with CORS, older browsers will stumble, and even "modern" browsers may have issues. I got it working in IE8/9, Firefox, Chrome. But not Safari on Mac. For some reason Safari doesn't like CORS, and threw an error when attempting to read the files from the bucket. I never solved it, but it didn't matter because nobody was accessing the web app with Safari. Also note that in IE8/9, unless the user has specifically enabled "Access data sources across domains" in their IE custom security settings, CORS will fail. Edit: ignore that previous sentence, CORS does function ok in IE8 regardless of the cross-domain setting mentioned. The problem I was having with IE8 was that "intranet" sites were falling back to "IE7 Document Mode" by default and CORS will definitely fail in that situation.