Closed WitchFreya closed 3 years ago
@WitchFreya Thank you, glad you find it useful! Sure I can take a look at that. Are you seeing any errors? Can you give me an example of what you are seeing happen with the spaces in file names so I know where to look?
I haven't seen anything in terms of error message except for when retrieving them image. It looks like it might be an issue with the URI encoding of spaces and other special characters. Example:
My best guess is that you're encoding the URI before upload and then Google Cloud is encoding it again for the public URL. I believe this is something that's a result of the storage adapter.
Does this help?
I was able to replicate the issue, just pushed a fix for this. It was originally using the url api to generate the relative file paths, but that api does automatically url encode the path strings which was the issue. I updated it to support spaces, but one thing to note is that the default ghost storage adapter does not support spaces. I left some notes in #8 if you're curious.
Thanks for the feedback!
Hi @WitchFreya I know this is an old issue, and maybe you aren't even using this package anymore, but I just wanted to let you know that based on your feedback I updated the plugin to sanitize file name input based on the gcs file name requirements and recommendations. I also added support for ascii folding, based on the lucene database implementation, which is a more robust way to sanitize input to the basic ascii characters and should improve stability for file name support dramatically.
Thank you for the feedback, and yes it did help. I appreciate it!
Great work on the adapter! It's the only thing we've run into for GCS with Ghost at the moment that properly works with folders. The only issue we're having at the moment is that it doesn't currently support spaces in file names, is that something that would be possible to add?