Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strapi Default File/Image Store #4302

Closed
danielamiir opened this issue Oct 21, 2019 · 6 comments
Closed

Strapi Default File/Image Store #4302

danielamiir opened this issue Oct 21, 2019 · 6 comments

Comments

@danielamiir
Copy link

How is Strapi saving files/images by default if I have connected to a MongoDB instance? It currently seems unclear whether Strapi is saving uploaded files to MongoDB or just locally? I am going to deploy Strapi in a production container environment that can sometimes be restarted, meaning if the container crashes&restarts, I should still be able to access uploaded images/files.

The documentation is unclear on this topic. It should clearly state what data is saved where with different configurations and setups.

@veitbjarsch
Copy link
Contributor

So feel free to add a PR 😉

@lauriejim
Copy link
Contributor

Hello @danielamiir !
I suggest you read this part of the documentation to install an upload provider that will send your file on AWS for example.

@Seanmclem
Copy link

Seanmclem commented Aug 23, 2020

So feel free to add a PR 😉

But, where is it saved though?
The original question can't add a PR without their answer

@derrickmehaffy
Copy link
Member

@Seanmclem the default provider stores the files on the local file system in ./public/uploads there is no provider that I am aware of that stores the binary files in any database.

@AnujDivkar
Copy link

Strapi stores the media files using the file system in ./public/uploads there is no way to configure strapi to stores the file in a database in binary format. However you can write your own code to save the file in binary format.
Refer the link below to know more :https://medium.com/@dineshuthakota/how-to-save-file-in-mongodb-using-node-js-1a9d09b019c1

@MattieBelt
Copy link
Collaborator

FYI, there is an community upload provider to save file in the mongoDB: https://github.com/AHgPuK/strapi-mongodb-files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants