nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.63k stars 3.99k forks source link

Animated Gif preview not animated. Possible issues regarding url not including file extension #9857

Closed Chillstice closed 3 years ago

Chillstice commented 6 years ago

-->

Steps to reproduce

  1. Upload valid animated .gif file
  2. View the file using the /preview url

Expected behaviour

The url should point directly to the animated .gif file including the extension so that it can be parsed by other programs and browsers properly. The .gif file should play the animation in browser and when embedded in other applications via the url.

Actual behaviour

The .gif file does not play the animation. The url does not have the file extension. When the /preview url is embedded in another application the .gif animation does not play. Some applications have a hard time parsing the url because it does not have the file extension.

Explaination

When creating share links with NextCloud 13.0.2 - by default - the link looks like this: https://cloud.chillstice.com/s/HQTipEKtdcGskrM (test file)

/preview can be added to the end of the url to make the file display in a basic form. Just the file, no extra elements. This breaks .gif animations.

Perhaps it would be best to include an option that allows admins to toggle to a new type of share url. For example: https://cloud.chillstice.com/s/HQTipEKtdcGskrM.png

For sharing pictures via url online, this makes the url appear to be more trustworthy and gives an impression of what the url will link to before it is clicked. Also, some services parse the url, determine what it links to, and create previews. Some of these services expect a file extension in the url.

Server configuration

Operating system: Linux 3.10.0-714.10.2.lve1.4.79.el7.x86_64

Web server: Apache 2.4.33

Database: MySQL

PHP version: 7.2

Nextcloud version: 13.0.2

Updated from an older Nextcloud/ownCloud or fresh install: Fresh Install

Where did you install Nextcloud from: the website

Signing status:

Signing status ``` No errors have been found. ```

List of activated apps:

App list ``` Enabled: - activity: 2.6.1 - admin_audit: 1.3.0 - apporder: 0.4.1 - bruteforcesettings: 1.0.3 - calendar: 1.6.1 - camerarawpreviews: 0.5.3 - checksum: 0.4.0 - comments: 1.3.0 - contacts: 2.1.5 - dav: 1.4.6 - drawio: 0.8.9 - drop_account: 0.0.11 - federatedfilesharing: 1.3.1 - federation: 1.3.0 - files: 1.8.0 - files_markdown: 2.0.4 - files_pdfviewer: 1.2.1 - files_rightclick: 0.8.4 - files_sharing: 1.5.0 - files_texteditor: 2.5.1 - files_trashbin: 1.3.0 - files_versions: 1.6.0 - files_videoplayer: 1.2.0 - firstrunwizard: 2.2.1 - gallery: 18.0.0 - groupfolders: 1.2.0 - impersonate: 1.0.4 - logreader: 2.0.0 - lookup_server_connector: 1.1.0 - mail: 0.8.1 - metadata: 0.6.0 - music: 0.6.1 - nextcloud_announcements: 1.2.0 - notes: 2.3.2 - notifications: 2.1.2 - oauth2: 1.1.0 - password_policy: 1.3.0 - previewgenerator: 1.0.9 - provisioning_api: 1.3.0 - quota_warning: 1.2.0 - ransomware_protection: 1.1.0 - serverinfo: 1.3.0 - sharebymail: 1.3.0 - sharerenamer: 1.3 - sociallogin: 1.7.1 - socialsharing_email: 1.0.3 - socialsharing_facebook: 1.0.2 - socialsharing_googleplus: 1.0.2 - socialsharing_twitter: 1.0.2 - survey_client: 1.1.0 - systemtags: 1.3.0 - theming: 1.4.5 - twofactor_backupcodes: 1.2.3 - twofactor_totp: 1.4.1 - updatenotification: 1.3.0 - workflowengine: 1.3.0 Disabled: - encryption - files_external - user_external - user_ldap ```

Nextcloud configuration:

Config report ``` { "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "chillstice.com", "cloud.chillstice.com" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "overwrite.cli.url": "https:\/\/cloud.chillstice.com", "htaccess.RewriteBase": "\/", "dbtype": "mysql", "version": "13.0.2.1", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "filelocking.enabled": true, "mail_smtpmode": "php", "mail_smtpauthtype": "LOGIN", "mail_smtpsecure": "ssl", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtpauth": 1, "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "587", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "maintenance": false, "htaccess.IgnoreFrontController": true, "updater.release.channel": "stable", "skeletondirectory": "\/home\/chillsti\/public_html\/default-files", "updater.secret": "***REMOVED SENSITIVE VALUE***" } } ```

Are you using external storage, if yes which one: nope

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser: Firefox Nightly 62.0a1 (2018-06-12) (64-bit)

Operating system: Windows 10 Pro (64-bit) Build 17137

MorrisJobke commented 6 years ago

cc @rullzer @skjnldsv

MorrisJobke commented 6 years ago

@skjnldsv Didn't you also wanted to add a nice hash to the share URLs to represent the kind of file?

skjnldsv commented 6 years ago

@MorrisJobke that ring a bell yes, but I don't fully recall what was the whole point in there :p

NickCloudAT commented 5 years ago

This has not yet been fixed? I personally upload many many gifs and also wan't to share them. It would be nice, if shared gifs would finally be animated and also embedable.

shubhank008 commented 5 years ago

Would love to have this as well.

jearton commented 5 years ago

When will this feature be implemented?

skjnldsv commented 5 years ago

@jearton no eta at the moment :)

welcometopwn commented 5 years ago

Would love to see this!

lucapax commented 4 years ago

When this issue is solved, will the animated gifs will work automatically?

Chillstice commented 4 years ago

It's been over a year, so I thought I would put a little status update in here:

This is in regards to Nextcloud 17.0.2 Still running LAMP server stack

Non-preview/ non-direct link animated .gif files show the animation and transparency, but the direct-link version still only shows the first frame without transparency.

If you embed the direct-link preview it WILL show transparency, but it will only show the first frame of the animation. (weird)

If you embed the normal, non-direct/ non-preview link, it will act like you're linking to a file and not an image.

Here's an updated example: Here's an animated .gif file with transparency: https://i.imgur.com/L54RsQY.gif

Here's the exact same file uploaded to my Nextcloud install: https://cloud.chillstice.com/s/Afe6YEicx2cJxWi This works well, but it's not where the problem lies

Here's the exact same file using the preview-url: https://cloud.chillstice.com/s/Afe6YEicx2cJxWi/preview oops lol

Here's a screenshot (animated .gif) of how the links embed in Discord: https://cloud.chillstice.com/s/bdYTwePRHnXTpry This is the problem I would use the direct-link in this instance, but then you wouldn't see the animation lol.

This applies to like 99% of applications that involve embedding images via url.

dirtbag commented 4 years ago

This issue is affecting us as well.. Running 18.0.1 on Linux. Any updates on this? -db

Dr-Ari-Gami commented 3 years ago

same question. any updates?

skjnldsv commented 3 years ago

2. View the file using the /preview url

Let me add a statement about this. A preview is obviously not the original file. This aims to quickly pre-view what it's about. Thus not having the exact gif here is 100% intended.

If you want to embed the file directly, you want the straight-to-the-file link, aka https://cloud.chillstice.com/s/Afe6YEicx2cJxWi/download: https://cloud.chillstice.com/s/Afe6YEicx2cJxWi/download

skjnldsv commented 3 years ago

For the issue about having the file name in the url instead of /download, see https://github.com/nextcloud/server/issues/5475

AetherCollective commented 3 years ago

Discord user here still having issues with this. Trying to get any animated gif to preview the animated gif on discord, but no matter what version of the link I use (/download, /preview, or neither) it does not preview an animated gif. I will either get a static image of the first frame of animation or it previews the nextcloud landing page, not the image itself. Should I make a new issue or is this on topic?

skjnldsv commented 3 years ago

@BetaLeaf no, we'll see with https://github.com/nextcloud/server/issues/5475 if discords likes it better

Chillstice commented 3 years ago

Ever since you put the /download url in your comment, github has been embedding the image and every time someone visits this page it makes a request to my nextcloud instance. I'm getting so much traffic from this page lol.

Oh, and it still doesn't work with some apps like discord.

hackthedev commented 1 year ago

lol

having the same issue still

BlackWolfWoof commented 1 year ago

Still same issue, has not been fixed yet