Giter Club home page Giter Club logo

Comments (7)

GK-GreyGhost avatar GK-GreyGhost commented on May 16, 2024 1

it works, thank you! 😁

from pocketbase.

ganigeorgiev avatar ganigeorgiev commented on May 16, 2024

when trying to download through the admin panel it also fails with the error "Couldn't download - something went wrong"

Assuming that your item.avatar is image filename, does this means that you can't see its preview/thumb in the admin UI?
If you are not seeing the preview/thumb in the admin, could you post the response from the browser "Inspect tool > Network" tab?

btw. More information about the file download url could be found here - https://pocketbase.io/docs/files-handling/#file-url or https://pocketbase.io/docs/api-files/

from pocketbase.

GK-GreyGhost avatar GK-GreyGhost commented on May 16, 2024

item.avatar is the image filename

I cannot see it in the admin UI
image

"Inspect tool > Network > Response > This request has no response data available."

image

from pocketbase.

ganigeorgiev avatar ganigeorgiev commented on May 16, 2024

This is strange. I think the only place in the file api that could return 400 is when we initialize the file storage system - https://github.com/pocketbase/pocketbase/blob/master/apis/file.go#L53.

But if you were able to upload it, then you should be able also to read it.

I'll try to test it in my Windows 10 VM, maybe is a platform specific issue related to the mime types similar to issue #6.

from pocketbase.

GK-GreyGhost avatar GK-GreyGhost commented on May 16, 2024

I do need to run it with "--http="127.0.0.1:8090"" otherwise it exits with "2022/07/10 09:33:53 listen tcp: lookup localhost on 192.168.0.1:53: no such host"

I just checked and the thumbnail is also generated correctly, I can open it and it displays in my file browser

from pocketbase.

ganigeorgiev avatar ganigeorgiev commented on May 16, 2024

I've just tested it and indeed there is an issue when using time.LoadLocation on Windows - golang/go#38453.

time.LoadLocation is currently used to set the Last-Modified header timestamp when serving files.
I'll do some tests and will see if I can manage to fix it without loading tzdata for the OS.

from pocketbase.

ganigeorgiev avatar ganigeorgiev commented on May 16, 2024

This should be fixed in the latest v0.2.2 release.

To avoid embedding the tzdata package, which will increase the binary size with almost 0.5MB, the current implementation will fallback to default browser value and will skip the explicit Last-Modified header if time.LoadLocation fails.

from pocketbase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.