Hey there,
I am trying to add a new image type and even though
@acl :public_read
is being set on module level as in my other image types but in this case it seems to not apply I keep getting
AccessDeniedAccessDeniedB3D18E1CE208EC64Nbf1dF8Cs/PhywfqdkcNMAfVnwWBWPlNOs3dXaRbhNhVYEeKEaYi90MzstIPjimLYpAwQJMWuKQ=
why is that?
here is my code:
defmodule projx.EventImage do
use Arc.Definition
use Arc.Ecto.Definition
@extension_whitelist ~w(.jpg .jpeg .gif .png)
@versions [:original]
@acl :public_read
def validate({file, _}) do
file_extension = file.file_name |> Path.extname() |> String.downcase()
Enum.member?(@extension_whitelist, file_extension)
end
def filename(_version, {file, scope}) do
file_name = Path.basename(file.file_name, Path.extname(file.file_name))
"event_image_#{scope.id}_#{file_name}"
end
# Override the storage directory:
def storage_dir(_version, {_file, _scope}) do
Application.get_env(:projx, :s3_upload_path)
end
end