Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

File preview after upload

Open gthorne opened this issue 11 years ago • 14 comments

Hey everyone- We've been testing out Rocket.Chat for over a week, and it looks promising. Here's one minor issue (not really a "bug", just an "annoyance") that we've noticed, though:

When you upload a file in a channel, you get a link to it. If that file is an image (in most of our cases, it will be), it would be nice to have a preview. Also, when you click on the link, it tries to download it. Now, you can go to the 'files' list in the sidebar, click it there, and get a viewable version, but how come we can't have that in the chat stream as well?

gthorne avatar Nov 05 '15 17:11 gthorne

Well, it should immediately show you the uploaded file... and when you click on it, it should actually open that just like you said it happens with the sidebar links. Let me investigate that... does that happen to you on the demo server as well?

marceloschmidt avatar Nov 05 '15 18:11 marceloschmidt

Let me try it.

gthorne avatar Nov 05 '15 18:11 gthorne

Ok, the preview works there, but clicking the link still attempts to download it.

gthorne avatar Nov 05 '15 18:11 gthorne

right... if you click the link yes, but if you click on the preview, it opens up...

marceloschmidt avatar Nov 05 '15 18:11 marceloschmidt

Ahh, ok. I didn't try that. Any idea why our install isn't generating the preview?

gthorne avatar Nov 05 '15 18:11 gthorne

If the preview is not showing to you, it's probably settings-related. Go to Settings / API. Is Embed set to true?

marceloschmidt avatar Nov 05 '15 18:11 marceloschmidt

Yes, it is.

gthorne avatar Nov 05 '15 18:11 gthorne

Are you running on HTTPS? Can you check if the image links are on the same protocol? And the browser console, any errors showing there?

marceloschmidt avatar Nov 05 '15 18:11 marceloschmidt

Both are HTTPS. No errors in the console.
When I inspect in the demo server, I see the preview in a div of the class 'inline-image'. That div isn't there on our server. But, there is a curious ::after that shows up where it should be.

screenshot

gthorne avatar Nov 05 '15 18:11 gthorne

We've had an issue with some people not being able to save avatars, or the avatars don't "stick". Not sure if it's related, but I wanted to mention it.

gthorne avatar Nov 05 '15 18:11 gthorne

I have to call for more help :) @RocketChat/core please? can someone help out here? I'm out of ideas...

marceloschmidt avatar Nov 05 '15 18:11 marceloschmidt

If you are running over SSL it could be a certificate issue. Was the certificate signed by a public CA? or was it an internally or self signed cert? If this is the case there is a setting under the general settings to allow self signed/invalid certificates. The checks get done on file upload so it will not back date previously uploaded images but for new images it should fix it.

emcguinness avatar Nov 05 '15 18:11 emcguinness

That was it, thank you sir! We are using a self-signed, and that was still set to 'false'.

gthorne avatar Nov 05 '15 19:11 gthorne

You rock @emcguinness !!! Thank you very much!

marceloschmidt avatar Nov 05 '15 19:11 marceloschmidt