• I noticed that files offloaded by this plugin to S3 are automatically given meta data (in addition to Content-Type) of Cache-Control and Expires. My main concern is the expires key appears to default to making the objects expire in a year. When I upload my files manually directly to S3, the only meta data there is the Content-Type.

    So my questions are:

    1. Does the expires key indicate a time at which the file will actually be removed from S3?
    2. How can make no expires key be applied to all files I offload to S3 through this plugin?
    3. What does the Cache-Control key to?

    Thanks,
    Rob

    https://www.ads-software.com/plugins/amazon-s3-and-cloudfront/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor A5hleyRich

    (@a5hleyrich)

    Hi Rob,

    Those headers are used purely for caching and do not indicate how the long the file will remain on S3. This article explains them in more detail:

    https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching?hl=en#cache-control

    Thread Starter robphat

    (@robphat)

    Ah. So the expires is when that cache expires, not when the file is removed from S3, correct?

    I thought it was going to remove it at the expire date based on another article I read on aws site, but looking further at object properties, I see there is an actual “Expiry Date” that is set to None. Is that what would actually remove the file from S3 if it had a date set for it?

    Also, I have another post that has not been responded to about how to set content disposition to attachment automatically for anything I offload to S3. How can I do that? This an actual very important issue for my site. I’ve been all over aws pages trying to figure out how to do it, but it’s a bit technical. I set response headers in the url that set the value of content distribution, but then the link gives an error that it can’t use those headers for anonymous users (or something like that.)

    So I’m hoping there’s a way to set that in this plugin or the pro version, or that you can tell me how to do it otherwise. I know how to set it manually for each filed offloaded, but my files are being uploaded via a front end form to wordpress by other users who don’t have access to my S3 account, and then offloaded by your plugin. So I need a way all these files are set to content disposition = attachement automatically because I can’t be going after then each time they upload a file to manually change the content disposition.

    Feel free to reference the last support comment by me in your forum here.

    Thanks,
    Rob

    Plugin Contributor A5hleyRich

    (@a5hleyrich)

    Correct, response headers only relate to how long the browser should store the file before re-downloading from the server. We never delete items from S3, unless you delete the item from the Media Library.

    Thread Starter robphat

    (@robphat)

    thanks so much for the clarification. I’m just getting to know AWS now

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘meta data keys added to s3 by plugin’ is closed to new replies.