1

Creating a file (key) into Amazon S3 using Python (and boto) is not a problem. With this code, I can connect to a bucket and create a key with a specific content:

bucket_instance = connection.get_bucket('bucketname')
key = bucket_instance.new_key('testfile.txt')
key.set_contents_from_string('Content for File')

I want to upload a file via the browser (file dialogue) into Amazon S3.

How can I realize this with boto?

Thanks in advance

Neverland
  • 773
  • 2
  • 8
  • 24

2 Answers2

2

You can't do this with boto, because what you're asking for is purely client-side - there's no direct involvement from the server except to generate the form to post.

What you need to use is Amazon's browser-based upload with POST support. There's a demo of it here.

Nick Johnson
  • 100,655
  • 16
  • 128
  • 198
0

do you mean this one? Upload files in Google App Engine

Community
  • 1
  • 1
Dyno Fu
  • 8,753
  • 4
  • 39
  • 64
  • No, I have an application (python + boto 1.9b) running at Google App Engine. I want to implement, that the users can upload files from their clients into their S3-buckets via a HTML-form (file dialogue). – Neverland Jan 17 '10 at 09:53