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

Link to image does not show preview anymore #1375

Open
MI-KY opened this issue Sep 22, 2024 · 1 comment · May be fixed by #1393
Open

Link to image does not show preview anymore #1375

MI-KY opened this issue Sep 22, 2024 · 1 comment · May be fixed by #1393
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working

Comments

@MI-KY
Copy link

MI-KY commented Sep 22, 2024

Steps to reproduce

Some time ago (unfortunately I can't say if this has to do with a specific version of tables) when I created a link to a image saved inside Nextcloud the table did not only show the link to the file but also a preview image (very little image).
Now, when you create a column with type "link" the table does not show any previews anymore.

The preview of the image does exist - this is also visible while you compile the fields:
grafik

But inside the table itself there is no preview - but there was one some versions ago:
grafik

Expected behavior

See a preview image of a link to a image

Actual behavior

Only linktext is shown

Tables app version

v0.8.0

Browser

Firefox 130.0.1

Client operating system

Ubuntu

Operating system

Ubuntu

Web server

Apache

PHP engine version

None

Database

None

Additional info

No response

@MI-KY MI-KY added 0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working labels Sep 22, 2024
@cm-schl
Copy link

cm-schl commented Sep 24, 2024

I've looked into the code a bit.
Could the problem maybe arise because of

if (item.thumbnailUrl && !await this.isUrlReachable(item.thumbnailUrl)) {

checking the url of item.thumbnailUrl?
In fact when I directly call the ocs api the result for a request like <DOMAIN>/ocs/v1.php/search/providers/files/search?term=<Imagename> looks like this:

   <element>
    <thumbnailUrl><DOMAIN>/index.php/core/preview?x=32&amp;y=32&amp;fileId=123456</thumbnailUrl>
    <title>Imagename.jpg</title>
    <subline>path</subline>
    <resourceUrl><DOMAIN>/index.php/f/123456</resourceUrl>
    <icon>/index.php/apps/theming/img/core/filetypes/image.svg?v=af2ffedd</icon>
    <rounded></rounded>
    <attributes>
     <fileId>123456</fileId>
     <path>/path/Imagename.jpg</path>
    </attributes>
   </element>

With &amp; in the url instead of &. Getting the url with &amp; in it returns an empty response - the url with & returns the preview. So maybe the check for the url by isUrlReachable now always deletes the thumbnail?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants