Is it possible to upload to Cloudfront via Javascript preferably using Gears for uploading

459 Views Asked by At

Is it possible to upload to Amazon Cloudfront using Javascript preferably with the use of (Google) Gears for uploading chunks?

I'm building a CMS for images and video data and want to integrate Cloudfront as a storage backend. To avoid first uploading to Google Appengine (which is where my system is hosted) and then from there upload the files to Cloudfront I'd want a solution that could be implemented in Javascript (doing the upload to the Cloudfront server).

2

There are 2 best solutions below

1
On

Yes, It is possible. You can use swfupload for the same. There is a nice article about to use swfupload for uploading files directly to Amazon S3 buckets. Hope it helps.

0
On

Try checking out https://github.com/burgalon/plupload-s3mixin will allow you to set your Django AppEngine application so that users upload directly to S3 (no need to pass through AppEngine for the uploads). This example uses PLUPLOAD which allows using several backends such as HTML5, Gears, Flash, HTML4, Silverlight.

The example code on plupload-s3mixin allows resizing on the client side before uploading to reduce upload time, and may also be combined with a thumbnail service such as https://github.com/burgalon/thumbnail-service to generate thumbnails on the fly as required