Shrine creates a random ID
for the uploaded file to AWS S3 when calling presign_endpoint
. Is there a way to change the way the ID
is generated using Shrine's configuration?
Yes, you can use :presign_location
:
Shrine.plugin :presign_endopint, presign_location: -> (request) do
"#{SecureRandom.hex}/#{request.params["filename"]}" # for example
end