don't generate uuid on client

it should be generated in companion or on the server
for security reasons (client code can easily be hijacked)
This commit is contained in:
Mikael Finstad 2026-04-29 22:01:07 +08:00
parent 260429d742
commit 260429af0c
No known key found for this signature in database
GPG key ID: 25AB36E3E81CBC26

View file

@ -334,10 +334,7 @@ export default class AwsS3<M extends Meta, B extends Body> extends BasePlugin<
}
#generateKey(file: UppyFile<M, B>): string {
return (
this.opts.generateObjectKey?.(file) ??
`${crypto.randomUUID()}-${file.name}`
)
return this.opts.generateObjectKey?.(file) ?? file.name
}
// --------------------------------------------------------------------------