Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expires header is N/A when uploading to S3. #277

Open
jung-hunsoo opened this issue Jan 21, 2019 · 1 comment
Open

Expires header is N/A when uploading to S3. #277

jung-hunsoo opened this issue Jan 21, 2019 · 1 comment

Comments

@jung-hunsoo
Copy link
Contributor

Environment

  • Elixir version (elixir -v): 1.7.0 / 1.7.4
  • Arc version (mix deps): 0.11.0
  • Arc dependencies when applicable (mix deps): :arc_ecto, "0.11.1"
  • Operating system: Ubuntu 14.04 / Ubuntu 18.04

Expected behavior

Uploaded files are configured with cache control.

  def s3_object_headers(_, {file, _}) do
    [cache_control: "public",
     content_type: MIME.from_path(file.file_name),
     expires: 600]
  end

Actual behavior

Both cache-control and expires are N/A.

@iamsteeve
Copy link

try

  def s3_object_headers(_, {file, _}) do
    [
    # time in seconds
       cache_control: "public, max-age: 6100",
       content_type: MIME.from_path(file.file_name)
     ]
  end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants