Upload img files in SQLLite database

I want to upload for each POST an image but I want to store the image within the database. E.g. in a blob/clob column)

I have the form for New POST. I want to add a field in which I will pick the file location (e.g. desktop). On Press Save, am expecting the file to be uploaded in DB along with the post details.

Any idea, directions ?

Unless you are uploading very small images, this is probably not what you want to do (putting an image in the db itself) - IMO personally, I’d do something like this: graphql mutation - the Redwood docs have their own opinion on it too, File Uploads | RedwoodJS Docs

1 Like

Thanks… I read the docs available around file upload topic. I need to have the images stored within the DB tables. I guess not possible with the current framework, available libraries…

I’m uploading images to postgres as a base64 string and it seems fine so far.

That particular feature is still being worked on, but having base64 strings in the database and vending them throught graphql doesn’t seem to be a problem for now.

I still have to do the upload part, and my images will probably cap out at at 600x600 and I’ll try to use webp to keep it smaller.

Thanks very much ! Indeed this works ok.