-
Notifications
You must be signed in to change notification settings - Fork 518
s3store: Allow customizing upload ID, object ID and bucket #1167
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
base: main
Are you sure you want to change the base?
Conversation
Hi, I'm excited when this PR will merge. |
Hi @Acconut, Thanks ❤️ |
Is this work stalled? One thing that would be nice is to allow choosing the uuid version. I'd be happy to let |
case Image.create_image(conn, attrs) do
{:ok, image} ->
mime_type = Map.get(metadata, "filetype")
ext = mime_to_ext(mime_type)
json(conn, %{
"ChangeFileInfo" => %{
"ID" => "images/#{image.id}.#{ext}"
}
})
{:error, msg} ->
send_resp(conn, 500, "Failed to create image")
end When I do this the in the |
Partly, yes. The s3store respected values for upload ID from the pre-create for a long time already, but it currently always appends the multipart upload ID to form the upload URL. That allows you to control the location where the file is saved on S3 right now without waiting for this PR as long as you are fine with exposing that location in the upload URL. |
Previously, the upload ID included the multipart ID, which made fully customizing the upload ID (and thus upload URL) impossible. With this PR, we hope to allow full customization of the upload ID and even the destination object key.
Overall changes:
Storage.Key
Storage.Bucket
TODO: