Skip to content

Commit c7da3ab

Browse files
a1pcmncw
authored andcommitted
drime: fix chunk-uploaded files ignoring workspace ID
When specifying --drime-workspace-id, a file greater than the limit at which file uploads get chunked would ignore the specified ID and get put into the default workspace instead. Completes the fix described in commit 2360e65 by properly closing the chunkwriter by providing the workspace ID to the Drime API call.
1 parent 879913d commit c7da3ab

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

backend/drime/api/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ type MultiPartEntriesRequest struct {
224224
ClientExtension string `json:"clientExtension"`
225225
ParentID json.Number `json:"parent_id"`
226226
RelativePath string `json:"relativePath"`
227+
WorkspaceID string `json:"workspaceId,omitempty"`
227228
}
228229

229230
// MultiPartEntriesResponse is the result of POST /s3/entries

backend/drime/drime.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,6 +1314,7 @@ func (s *drimeChunkWriter) Close(ctx context.Context) error {
13141314
ClientExtension: s.extension,
13151315
ParentID: s.parentID,
13161316
RelativePath: s.relativePath,
1317+
WorkspaceID: s.f.opt.WorkspaceID,
13171318
}
13181319

13191320
entriesOpts := rest.Opts{

0 commit comments

Comments
 (0)