[Vuejs]-Javasctipt, Chunks and NodeJs

0👍

POST is for a reason. you are using GET, POST is just sitting useless in your code

There are 2 Problems which I am seeing

  1. I don’t know what you are trying to do. but do note that there is a URL length limit. and you are trying to exploit it and that’s why you are getting this error. I don’t understand why you are using POST if you won’t just want to use bas64 in the URL

  2. It is a best practice that you don’t use Postgres for blob or byte type of things. just a suggestion. use something like s3 or spaces.

    btnSubmit.addEventListener("click", () => {
    
         let dat_title = file_input.files[0].name;
    
         let url_files = "http://localhost:3000/blobFile/"
    
         console.log("URL:\n" + url_files)
    
         fetch(url_files, {
             method: "POST",
             'data | body': {'**Your data over here**'}
         })
         .then(response => {
             response.json().then(parsedJson => {
    
                 console.log(parsedJson);
    
             }) 
         })
    
     })
    

Leave a comment