Prefixing can be used to create a pseudo-directory structure in the bucket.
tusd supports this with a hardcoded ObjectPrefix option:
https://github.com/tus/tusd/blob/b4ffdf43f034099ee46437271de2ff98c1f52397/pkg/s3store/s3store.go#L987-L994
in @tus/s3-store we have partKey where this could be supported:
|
private partKey(id: string, isIncomplete = false) { |
|
if (isIncomplete) { |
|
id += '.part' |
|
} |
|
|
|
// TODO: introduce ObjectPrefixing for parts and incomplete parts. |
|
// ObjectPrefix is prepended to the name of each S3 object that is created |
|
// to store uploaded files. It can be used to create a pseudo-directory |
|
// structure in the bucket, e.g. "path/to/my/uploads". |
|
return id |
|
} |
However it might be more flexible have a function getObjectPrefix (upload: Upload) => string so it can be done dynamically based on metadata?
cc @fenos
Prefixing can be used to create a pseudo-directory structure in the bucket.
tusd supports this with a hardcoded
ObjectPrefixoption:https://github.com/tus/tusd/blob/b4ffdf43f034099ee46437271de2ff98c1f52397/pkg/s3store/s3store.go#L987-L994
in @tus/s3-store we have
partKeywhere this could be supported:tus-node-server/packages/s3-store/index.ts
Lines 144 to 154 in 0af377d
However it might be more flexible have a function
getObjectPrefix (upload: Upload) => stringso it can be done dynamically based on metadata?cc @fenos