-
Notifications
You must be signed in to change notification settings - Fork 55
No option to use original filename #11
Comments
Looking at the forks it seems like @GwonHyeok already found a fix for the issue. Looks like a better, more robust solution rather than more options. |
CC: @JedWatson |
For anyone that came here looking for an example of how to use the original file name with this plugin, check out https://gist.github.com/robksawyer/6060412c3f86ddbc68b29ed09eef75c3. |
@robksawyer thank you - that worked a treat 🎉 |
Just wanted to note that I was having difficulty in s3 with files that have spaces in them, so when I want to keep the original file name I use this:
I'll also mention this for anyone who wants to generate a public url that is saved. I usually use a method that looks like this:
The S3_BASE_URL is saved in the |
It looks like the
generateFilename
function is set tonameFunctions.randomFilename
- meaning any upload using this storage adapter will always have a random name.Suggest adding an option to allow the original name to be used instead.
Concept:
Or should this be handled somewhere higher up in the keystone Types? Or be changed to support a filename function in the Field definition (e.g.,
filename: (file) => file.originalName
)?The text was updated successfully, but these errors were encountered: