arc
arc copied to clipboard
Expires header is N/A when uploading to S3.
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.
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