Skip to content
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

Add support for random file naming flag #253

Open
ianjasperlean opened this issue Sep 21, 2020 · 0 comments
Open

Add support for random file naming flag #253

ianjasperlean opened this issue Sep 21, 2020 · 0 comments

Comments

@ianjasperlean
Copy link

Hi just want to propose some minor changes if you can support uuid naming out of the box when uploading a file?
For example:
@post('upload')
@UseInterceptors(
GCloudStorageFileInterceptor('file', {
randomFilename: true
}),
)
uploadFile(@uploadedfile() file: UploadedFileMetadata) {
console.log(file);
}

You may want to store the file with an arbitrary name instead of the original file name. You can do this by passing the randomFilename property attribute set to true as follows:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant