title: PostgreSQL - How to insert Base64 images strings into a BYTEA column?
body: <p>I have the following SQL:</p>
  
  <pre><code>CREATE TABLE Documents (
    Id INT NOT NULL,
    UserId INT NOT NULL,
    Label CHARACTER VARYING(220) NOT NULL,
    Image BYTEA NOT NULL,
    PRIMARY Key(Id),
    FOREIGN KEY (UserId) REFERENCES Users(Id)
  );
  </code></pre>
  
  <p>I want to know, How should I have to insert the Base64 image into the table.</p>
  
  <p>The Base64 string comes from a Buffer from after getting the image using the <a href="https://nodejs.org/docs/latest-v10.x/api/fs.html" rel="nofollow noreferrer">fs</a> module on Node.js.</p>
  
  <p>I'm attempting to insert the image using raw queries of Sequelize, but I have not found proper information on this.</p>