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.
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)
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 🍣
The plugin stores the images on some external service (like s3, cloudinary, imagekit etc) and on your Mongodb database, it just stores thelink
to the image, not the image itself
Get help straight from the Payload team with an Enterprise License.