FTP file (video) to Amazon S3

Hello All …

Hopefully, someone can help me out here. I have a script, which you drag & drop a image to and magically upload to a server. However I need to alter it so that it works with Amazon S3.

property ftpURL : "ftp://username:pass@ftp.mywebsite.com/Lincoln/HuttoBranches/website/photos/"

on open of theFiles
	tell application "URL Access Scripting" to upload theFiles to ftpURL ¬
		replacing yes with progress without binhexing
end open

This script works fine and dandy.

One of the ‘gotchas’ when using S3 is it doesn’t always treat permissions nicely, so these need to be set “on-the-fly” at the time the video is getting uploaded. i don’t know how to do this either.

I assume:

ftp://username:pass@ftp.mywebsite.com/Lincoln/HuttoBranches/website/photos/

Where my access key would be Key ID: THISI5NOT4REALNUMBER

(a string 20 characters in length)

Secret Key: this1stringisonlyfortycharactersinlength

(a string 40 characters in length)

ftp://username:pass@s3.amazonaws.com/

So,…

property ftpURL : "ftp://THISI5NOT4REALNUMBER:this1stringisonlyfortycharactersinlength@s3.amazonaws.com/"

on open of theFiles
	tell application "URL Access Scripting" to upload theFiles to ftpURL ¬
		replacing yes with progress without binhexing
end open

But this doesn’t work. I’ve played around with different variations, and still no joy. Does anyone know how to get this working?

And also, please don’t forget the permissions. These will need to get set when the video is getting uploaded.

Thanks so much for your help and patience!

Cheers

Hi Ray,

as far as I know Amazon S3 does not support FTP access directly.
I recommend a scriptable and S3 compatible application like Cyberduck.
Apple dropped URL access scripting in Lion anyway