#How to upload an image without using a database and using local files

13 messages · Page 1 of 1 (latest)

ripe raven
#

The issue is that i dont have a database nor a cloud service and i need help regarding uploading an image from the admin side. So is multer preferred or should i use static mount in express and react stack

severe obsidian
#

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

ripe raven
#

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

severe obsidian
severe obsidian
#

Create an organisation system using folders and file names

ripe raven
#

Ok thanks

vapid rose
#

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

ripe raven
#

I have setup an authorisation system specifically designed to help admin portal side