I need some uploading media. Whenever I upload something on Payload it seems to be working or resolving for a while but then the link breaks and the resource can't be fetched any longer.
fe.
https://p01--admin-cms--qbt6mytl828m.code.run/media/collection_ding_ex-1.png
this is my code for adding media to the collection;
do I perhaps need to change some settings on MongoAtlasDB?
Good morning @olivier_vd, this is definitely a weird issue.
I'm not sure that it's related to Payload, but happy to help troubleshoot
could it be related to updating the code for the collection? - it seems stable now without changing anything to the repo
Ah, changing your collection may have been related
But it's hard to know for sure
@olivier_vd where are you deploying to? where are you storing your media?
judging from the domain, he's deploying to northflank
(which uses ephemeral storage by default)
Yes northflank!
MongoAtlas for storage
You mean for the database?
On northflank, everything stored on it actually gets deleted every time the project is re-built
Including the images
Because the default storage isn't persistent
So you'd either need to store the images somewhere else (the cloud storage plugin may be helpful), or alternatively you can also set up permanent storage inside of notquests and mount that (I think in your Dockerfile) ^^
Images get deleted on Northflank
can the plugin be connected to an MongoAtlasDB? @Alessio 🍣
Yep
The plugin stores the images on some external service (like s3, cloudinary, imagekit etc) and on your Mongodb database, it just stores the
linkto the image, not the image itself
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.