Skip to content
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

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

Closed
Chillstice opened this issue Jun 13, 2018 · 20 comments

Comments

@Chillstice
Copy link

-->

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
Copy link
Member

cc @rullzer @skjnldsv

@MorrisJobke
Copy link
Member

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

@skjnldsv
Copy link
Member

skjnldsv commented Jun 13, 2018

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

@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jul 14, 2018
@NickCloudAT
Copy link

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.

@nextcloud-bot nextcloud-bot removed the stale Ticket or PR with no recent activity label Feb 15, 2019
@shubhank008

This comment has been minimized.

@jearton

This comment has been minimized.

@skjnldsv
Copy link
Member

@jearton no eta at the moment :)

@welcometopwn

This comment has been minimized.

@lucapax
Copy link

lucapax commented Jan 22, 2020

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

@Chillstice
Copy link
Author

Chillstice commented Jan 23, 2020

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

This comment has been minimized.

@skjnldsv skjnldsv added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Aug 20, 2020
@Dr-Ari-Gami

This comment has been minimized.

@skjnldsv
Copy link
Member

skjnldsv commented Sep 14, 2020

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 skjnldsv removed the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Sep 14, 2020
@skjnldsv
Copy link
Member

For the issue about having the file name in the url instead of /download, see #5475

@AetherCollective
Copy link

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
Copy link
Member

@BetaLeaf no, we'll see with #5475 if discords likes it better

@Chillstice
Copy link
Author

Chillstice commented Jan 14, 2021

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
Copy link

hackthedev commented Feb 6, 2023

lol

having the same issue still

@BlackWolfWoof
Copy link

Still same issue, has not been fixed yet

@nebriv
Copy link

nebriv commented Dec 2, 2024

Also having this issue, /download and /preview don't embed properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests