0

I am currently working on a webscraper that downloads an image and its title, description etc. from a website.

The device that runs the scraper programm is my raspberry pi. I want to store the image on the disk of my database server (mariadb on debian) and save the title, description etc. and the filepath to the image in my database.

Is there a commonly used way to get the image to my db server, maybe one that is included in sql itself? My current plan would be to send it there via scp, manually store it at a directory and add the path to the database.

I'm sure there are many ways to do this.

Greetings

5
  • For nearly every programming language MySQL/MariaDB SQL drivers are available. Using this driver and the SQL framework of your chosen language you can execute SQL commands/queries.
    – Robert
    Commented Nov 16, 2019 at 14:00
  • I'm aware of that. i know how to send the name etc. to my database. What im looking for is a way to send my downloaded image to the database server, save it on the disk and the filepath of the image in the database.
    – rogerg
    Commented Nov 16, 2019 at 14:27
  • Upload image directly through mySQL Command Line
    – Robert
    Commented Nov 16, 2019 at 14:48
  • Im sorry, but can't find an answer in that thread that solves my problem. My goal is to somehow get the file to my database server, save it on the disk and save the path (e.g. /home/img/myimg1.png) in a image_path column in a table. As far as i can see, your thread only shows how to upload and save an image in a database as blob.
    – rogerg
    Commented Nov 16, 2019 at 15:44
  • If you want to save a file outside of a database you can't use database commands. Use for example scp instead.
    – Robert
    Commented Nov 16, 2019 at 17:38

0

You must log in to answer this question.

Browse other questions tagged .