TableTools not working when SWF hosted on AWS S3 - datatables

I'm trying to use jQuery DataTables and TableTools in conjunction with my Django app, which uses Django-Storages (Boto) to manage my static files on S3. Although I can successfully point my SWF file to the SWF on S3, I've noticed that none of the COPY CSV etc buttons work (except PRINT) when using S3. However, it all works perfectly once I point to a public CDN.
I can use the CDN but am wondering if anyone knows why it doesn't work on S3. I'm guessing it may be a permissions issue?

I am facing the same problem with SWF on S3. I solve it stupid way by moving the swf file back to server instead of load from S3.
Hope this help.
My theory below, not tested:
I suspect it is due to the cross domain issue, as load from S3, the file path changed as well the domain name. This could happen if the Action Script did not check if crossdomain policy specified.

Related

Programmatically add meta data for MP4

I have a server from where a single consumer me download MP4 files. I would like to add the username to the meta-data of the file at the time the user clicks "download". Amazon does something like this for the MP3 files.
Now, a slight variation to this is how would I do the same thing if the files are on Amazon Cloudfront.
Thanks!
You would have to route your request through your web server.
Logged-in user clicks
Web server downloads the MP4 file from S3 to its file system.
Web server uses an MP4 editor to add the correct MP4 metadata to the file.
Web server serves the MP4 file back to the customer as a download.
S3 is dumb file storage, so you can't do any on-the-fly editing or processing. Any such work must occur on a machine with a CPU.
As such, the question you posed could not be accomplished in any meaningful way using CloudFront, since the traffic needs to route back through your server for post-processing anyway.

Rails, paperclip and s3, prompt download or view images?

So i got successfully working Paperclip and S3 uploading in RoR 3, but it turns out that some images are prompted to download and others can be viewed in the browser. What determines this behaviour?
Part of this could be browser-specific behavior based upon the MIME file type that the server is sending your browser. .png files are most often the culprit for forced download. See this SO question about the issues between IE uploads, old MIME types, etc.
If it is inconsistent on the type of picture, there is a way you can force a file to be downloaded, but no good way to force an image to be viewed in the browser.
Edit: I know that the forced download isn't rails specific, so here is the rails-specific version
Is one of the following helps you?
Paperclip Force Download
Rails 'link_to' to Download An Image Immediately Instead of Opening it in the Browser
Both of them says to send the file to the browser as attachment.

Amazon S3/Cloudfront Image Overwriting Issue

I'm currently serving up static images to my site via Amazon Cloudfront and for some reason my images won't update when I try to overwrite them with an updated image. The old image continues to display.
I've even tried deleting the entire images folder and uploading the newest ones without success. The only thing that works is renaming the image.
Anyone else experience this?
recently amazon s3 announced new feature called content invalidation. it allows you to invalidate some file just with a one call. check cloudfront api references for more details.

How can I remotely upload files to Amazon S3?

I am looking for a way to transfer files from a server to Amazon S3 bucket, without first downloading the files to my computer. All of the files I plan to transfer can be accessed publicly (e.g. http://something.com/file.ext). Everything I tried only allows me to directly upload files from my Mac to S3.
P.S. Although I have access to windows, a Mac app that can do this would be great... or maybe a browser-based solution :)
You can check out this PHP class (and a net tuts tutorial on it), it works well, I've been using it for a while now. It includes bucket creation, deletion, adding files and more. You can easily add files remotely from another server, or from the same server you're running it on.

Updating permissions on Amazon S3 files that were uploaded via JungleDisk

I am starting to use Jungle Disk to upload files to an Amazon S3 bucket which corresponds to a Cloudfront distribution. i.e. I can access it via an http:// URL and I am using Amazon as a CDN.
The problem I am facing is that Jungle Disk doesn't set 'read' permissions on the files so when I go to the corresponding URL in a browser I get an Amazon 'AccessDenied' error. If I use a tool like BucketExplorer to set the ACL then that URL now returns a 200.
I really really like the simplicity of dragging files to a network drive. JungleDisk is the best program I've found to do this reliably without tripping over itself and getting confused. However it doesn't seem to have an option to make the files read-able.
I really don't want to have to go to a different tool (especially if i have to buy it) to just change the permissions - and this seems really slow anyway because they generally seem to traverse the whole directory structure.
JungleDisk provides some kind of 'web access' - but this is a paid feature and I'm not sure if it will work or not.
S3 doesn't appear to propagate permissions down which is a real pain.
I'm considering writing a manual tool to traverse my tree and set everything to 'read' but I'd rather not do this if this is a problem someone else has already solved.
Disclaimer: I am the developer of this tool, but I think it may answer your question.
If you are on Windows you can use CloudBerry Explorer Amazon S3 client. It supports most of the Amazon S3 and CloudFront features and It is freeware.
I use the Transmit Mac app to modify permissions on files I've already uploaded with JungleDisk. If you're looking for a more cross-platform solution, the S3Fox browser plugin for Firefox claims to be able to modify permissions on S3 files as well.
If you need a web based tool, you can use S3fm, free online Amazon S3 file manager.
It's a pure Ajax app that runs in your browser and doesn't require sharing your credentials with a 3rd party web site.
If you need a reliable cross-platform tool to handle permissions, you can have a look at CrossFTP Pro. It supports most of the Amazon S3 and CloudFront features as well.