Comments (2)
This is not what the metadata argument is for, try headers. Closes #13
Sent from phone
Anders Ytterström [email protected] wrote:
I am trying to set some far future expiration on my files in a bucket on S3, using this python code:
future = 60_60_24*666
future_date = datetime.now() + timedelta(seconds=future)
future_date = future_date.strftime("%a, %d %b %Y %H:%M:%S GMT")and further down in file:
f = open(src)
s3.put(key, f.read())s3.copy("%s/%s" % (bucket, key), key, metadata={
"Cache-control": "max-age=%d" % future,
"Expires": future_date})However, when I investigate the files in firebug they do not have neither Expires och Cache-control. Instead there are prefixed versions of the metadata.
x-amz-meta-cache-control max-age=57542400
x-amz-meta-expires Thu, 15 May 2014 01:03:25 GMTI would highly appreciate to set metadata and skip the "-x-amz-" prefixes.
Reply to this email directly or view it on GitHub:
#13
from simples3.
Ah, my bad. I missed headers when reading the docs. Thank you for the quick reply!
from simples3.
Related Issues (13)
- Bucket creation HOT 2
- HTTP 204 returned on S3Bucket.delete HOT 2
- Don't bail when python lacks ssl support HOT 2
- Broken RFC 822 formatting on non-US locale HOT 2
- UnboundLocalError on S3Bucket.listdir() method
- `;` as query string separator causes a trouble HOT 4
- progress callback doesn't work HOT 3
- Add support for buckets in different regions HOT 9
- listdir limited to 1000 entries HOT 1
- Needs proxy support HOT 2
- Need put_file return status
- Edit : fixed in github but not in pypi : Bad content-length set after 2 put_file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simples3.