s3store: Allow customizing upload ID, object ID and bucket#1167
s3store: Allow customizing upload ID, object ID and bucket#1167Acconut wants to merge 12 commits into
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")
endWhen 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. |
|
Hi @Acconut , Thanks. |
|
I’m really excited about this feature! I can’t wait to start using it! |
|
I urgently need this improvement and am looking forward to its release. |
…hook Backport of tus#1167 onto v2.9.2. Allows the PreCreate hook to set Storage.Key and Storage.Bucket in FileInfoChanges to control where the final uploaded file is stored, while .info and .part metadata files remain in the configured store bucket. Key changes: - s3Upload now tracks uploadId, objectKey, objectBucket separately - multipartId stored in .info file instead of upload ID - Backwards compatible with old uploadId+multipartId format - Updated serve_content to use new field names
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.KeyStorage.BucketTODO: