#How to upload an image without using a database and using local files
13 messages · Page 1 of 1 (latest)
Looks like an HTML file upload, express, and a body parser such as multer works. Not sure why you would need a DB or cloud service.
I don't know what static mount is
Hmm but can i access the local images also
from my own folder
i need db because i have a route called gallery where i need a get request to get all the images
I don't know what you're talking about.
I mean one option is to get a DB. Another option is to scan the file system to find the files you saved
Create an organisation system using folders and file names
Ok thanks
depending on the specific application you may end up wanting a DB eventually to store additional stuff (e.g. who uploaded the image). i'm actually kinda surprised you don't have one already given this is an "admin" use case—how do you keep track of who is allowed to access the admin panel?
either way you typically wouldn't store the image itself in the DB. rather just store it on the filesystem or in a blob store like S3, and keep track of its filename + metadata in the database
I have setup an authorisation system specifically designed to help admin portal side