You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And the file does appear to be uploaded (admin UI) -
\Edit: It has to do with the invalid type - when setting it to "image/png", it loads correctly on the frontend. I'm not seeing a way to set this via the api call?
The actual post is trying to load a video:
The text was updated successfully, but these errors were encountered:
Hey! Thanks for the detailed report! Your diagnosis is correct that the frontend doesn't know which MIME type the image has, and then fallbacks to loading a video.
In the future I might change the way it handles unrecognized MIME types to a generic URL so that users can still copy the direct link.
The way MIME types are handled in Share Me generally still needs improvement. I'd like to move away from the frontend sending this information, since it can be easily detected in the backend, which is what #31 does for the /api/posts route that I'll migrate the frontend to, soon.
Unfortunately PocketBase doesn't have read-only fields as far as I'm aware. So I'll have to find a different way to make the type attribute come from the server side.
Using Postman
I receive a 200 Response (below)
API Response:
{ "author": "on2imnwqggminrg", "collectionId": "tqco9f8weal93h6", "collectionName": "posts", "created": "2023-05-20 04:23:05.739Z", "files": [ "z1qxne4clk31jlw" ], "id": "p5othop5v4z4k18", "nsfw": false, "public": false, "tags": null, "title": "", "updated": "2023-05-20 04:23:05.739Z" }
And the file does appear to be uploaded (admin UI) -
\Edit: It has to do with the invalid type - when setting it to "image/png", it loads correctly on the frontend. I'm not seeing a way to set this via the api call?
The actual post is trying to load a video:
The text was updated successfully, but these errors were encountered: