s3-raw-to-jpeg_4.py 648 B

123456789101112131415161718
  1. def uploadToS3(key_meta):
  2. # Tiny
  3. key_tiny = Key(bucket)
  4. key_tiny.key = key_meta.s3_path + key_meta.filename_tiny
  5. key_tiny.set_contents_from_filename(key_meta.filename_tiny)
  6. print ("[%s] uploaded" % key_tiny.key)
  7. # Preview
  8. key_prev = Key(bucket)
  9. key_prev.key = key_meta.s3_path + key_meta.filename_prev
  10. key_prev.set_contents_from_filename(key_meta.filename_prev)
  11. print ("[%s] uploaded" % key_prev.key)
  12. # Full
  13. key_full = Key(bucket)
  14. key_full.key = key_meta.s3_path + key_meta.filename_full
  15. key_full.set_contents_from_filename(key_meta.filename_full)
  16. print ("[%s] uploaded" % key_full.key)