Neverland
Neverland

Reputation: 775

Easy way to upload files to S3 via HTTP Form

I have written a tiny web appication in python that allows me to browse my S3 buckets. The web appication runs inside the Google App Engine.

Now, I want to create a html form for this web appication that allows me to upload a file into the bucket.

These information are already inside the form: AWSAccessKeyId and the name of the bucket.

I want that the keyname is the name of the file that is selected by the user via <input name="file" type="file">

Another problem is: Can I create the content of the (hidden) input tags policy and signature before a file is choosen?

I want to solve this problem only with HTML and Python. No JavaScript.

Is this possible?

Upvotes: 2

Views: 3851

Answers (1)

The Matt
The Matt

Reputation: 6636

Read the developer documentation from Amazon: Browser Uploads to S3 using HTML POST Forms

There is Python examples in there to get you started.

Upvotes: 4

Related Questions