Skip to content

🐛 Bug Report: getFileViewURL/getFilePreviewURL returns invalid URL #61

@scottgrobinson

Description

@scottgrobinson

👟 Reproduction steps

N/A

👍 Expected behavior

the new getFileViewURL/getFilePreviewURL should include the projectID as it appears to be required.

👎 Actual Behavior

In < 0.10.0 I was able to get a URL using getFileView.
In > 0.10.0 this has changed and we need to use getFileViewURL, however, that does not seem to work.

getFileView < 0.10.0 would return a URL with "view?project=PROJECTID" appended to the end (https://fra.cloud.appwrite.io/v1/storage/buckets/BUCKETID/files/FILEID/view?project=PROJECTID

However, this does not happen with getFileViewURL and results in an error message that states "{"message":"Storage bucket with the requested ID could not be found.","code":404,"type":"storage_bucket_not_found","version":"1.7.4"}"

I've manually resolved in my workflow using

let url = storage.getFilePreviewURL(BUCKETID, fileId, 400, 400).href;
url = url + '?project=PROJECTIS'
return url

🎲 Appwrite version

Version 0.10.x

💻 Operating system

Linux

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy