-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Lightning Storage doesn't support filenames with spaces #15271
Comments
I vote for error message. In the cloud, it is not so uncommon to encounter file names in links. It can be inconvenient to work with them if the spaces are encoded as %20. |
@awaelchli, hi! 👋
But should this be a decision enforced by Lightning Storage or something we leave for the Lightning App developers to decide? In my eyes, Lightning Storage API is intended to be used alongside fs writes and reads primarily to store the app artifacts consistently between app restarts and recreations (and even share it between apps). Why would Lightning Storage API care about spaces in this use case? These files aren't being exposed as links anywhere. And, if the Lightning App developer decides to expose these files as links, they probably should know to avoid spaces, and if they choose not to, it's OK to support them still, IMO. Of course, we should be converting spaces to-and-from %20 in the framework, and in the web app Artifacts UI, the user should see spaces, not %20, everywhere. My vote is for adding the whitespace support because it streamlines the development experience instead of hindering it by showing an error. |
That makes sense. The storage call could occur anytime in an app after running a long time so an error is not useful. Also because the developer of the app might not wand to handle this themselves for their users. Feel free to also include such concrete proposals and considerations/learnings into the issue description directly next time. |
This issue has been automatically marked as stale because it hasn't had any recent activity. This issue will be closed in 7 days if no further activity occurs. Thank you for your contributions - the Lightning Team! |
Bug description
Lightning Storage doesn't support filenames with spaces; it crashes with an access error if the user tries to upload a file that contains a space. We need to either add the support or make sure that:
I vote for adding the support of any valid filenames to the Lightning Storage:
In my eyes, Lightning Storage API is intended to be used alongside fs writes and reads primarily to store the app artifacts consistently between app restarts and recreations (and even share it between apps). Why would Lightning Storage API care about spaces in this use case? These files aren't being exposed as links anywhere. And, if the Lightning App developer decides to expose these files as links, they probably should know to avoid spaces, and if they choose not to, it's OK to support them still, IMO.
Of course, we should be converting spaces to-and-from %20 in the framework, and in the web app Artifacts UI, the user should see spaces, not %20, everywhere.
My vote is for adding the whitespace support because it streamlines the development experience instead of hindering it by showing an error.
How to reproduce the bug
Error messages and logs
No response
Environment
More info
No response
The text was updated successfully, but these errors were encountered: