-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Picture with Whitesapce as Name Doesn't Load #32282
Comments
For me, the default file name includes date and time, prefixed with "Clipboard". Just tried it out:
This is just too long. I assume the actual string depends on the system that provides the clipboard information when pasting (paste event?) For me as a user, it would also be ok to just have a reasonable placeholder for the file name when pasting an image from the clipboard (e.g. "clipboard", "pasted image"). Alternatively, it would also be ok to make file name optional and generate a random string when posting the message. |
I am able to reproduce this bug. I think the default behivour should be that no white space should be allowed as naming. Will create a fix pr asap. |
@SySagar please do not "fix" it like this. Your PR would merely address the symptom and not the underlying issue @kariem and me pointed out. We replace the name, because the one auto-generated is
The fix in my opinion should be either to allow empty names and correctly auto-generate IDs (e.g. I know this takes longer to address but the sole reason we have this issue is that we tried to find a workaround for an issue we have, which is the obnoxious file name. |
ok so bascially there are few doubts of mine. |
I have absolutely no web dev experience, so take that with quite a big grain of salt
You could use a placeholder, which is used, if there is no value applied. A step further would be to drop the input form for the name altogether and autogenerate the name in the background.
I cannot follow you there. Why would I need a description? Why can't I have just a picture without anything? |
Yes you can that is what I am suggesting it will default to if you don't provide any description and image/file name |
Chiming in here ... I think the problem may not be that we cannot use " " as filename but that the defaults are not really helpful, if you just want to share a screenshot. Either you have a filename that you do not want to use or have to change the file name manually. @thekief followed the latter approach and ran into the issue described here. Let's go back one step. This is what I see, when I paste an image in RocketChat web I can now just click Send and everything is done. However, I do not want the file name to be this long. I do not want the name to have a It's not a big problem, but then anyways, why does the form not have a reasonable default? If I remove the name, why isn't there a good default fallback? Let's look at the thing we are using to discuss this. Here, in the GitHub Issues comment text area, I didn't even have to think about my screenshot. I pasted it from the clipboard and the editor will
I do not have to do anything else, just paste the image. How about making it as easy as that for someone who wants to paste into a RocketChat chat? Suggestion
In the context of this 'bug', I would suggest: if the user does not provide a file name in the form, we use This would be fine for me. |
That sounds more natural and easier actually. So basically there are two cases we need to handle:
If I am not wrong the while form will become redundant soon as new file upload design will be maintined soon. For now the fix sounds reasonable. |
Your "reasonable default" is not the same as mine, and that is the nub of the problem. I like mine time stamped. The length is no issue - I have loads of screen estate. It would be a pain to have to type the time out manually every time.... ! An 'option' might be a better route.
You do not need to have .png or whatever, but you do need at least one character in the filename, currently. Again, an option might work better than fixing it one way or another. |
Description:
I tend to paste images into RocketChat, which implicitly creates a pre-generated name. As I tend to avoid too long names, I
shift + tab
to get to the name field, replace it with a whitespace and hit enterSteps to reproduce:
Expected behavior:
A click on the preview opens the picture.
Actual behavior:
When clicking on the picture, the load screen overlay pops up and it hangs there.
Server Setup Information:
Client Setup Information
Additional context
This affects other OSes and the desktop app as well.
Relevant logs:
n/a
The text was updated successfully, but these errors were encountered: