1

when I upload a file I want to get a string, store it in the database, and retrieve it later as a uri opening it in a new window. When i upload the file, i get a base64 string, and i store it in the database as LongText

export function getString(asset, callback) {
 if(asset) {
 const reader = new FileReader();
 reader.readAsDataURL(asset)
 reader.onload = () => {
  callback(reader.result)
  }
 }
}

I retrieve it from database and try to open the uri of the file with this function:

openFile(string) {    
window.open(string, "_blank_")
  };

but i get that 414 Request - uri too large. how can i reduce the length of the uri?

Shadow
  • 33,525
  • 10
  • 51
  • 64
mikerug88
  • 135
  • 8

0 Answers0