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?
Asked
Active
Viewed 204 times
0

jpac
- 69
- 5
1 Answers
0
Yes, you can use :presign_location
:
Shrine.plugin :presign_endopint, presign_location: -> (request) do
"#{SecureRandom.hex}/#{request.params["filename"]}" # for example
end

Janko
- 8,985
- 7
- 34
- 51