i want to give the user the download url once they have bought the images and here’s my code :
const get_file_url = (file: File) => {
return new Promise((acc, err) => {
const reader = new FileReader()
reader.onload = (event) => {
acc(event.target?.result)
}
reader.onerror = (error) => {
err(error)
}
reader.readAsDataURL(file)
})
}
you just pass it a file and it creates the url fine right, No the urls are huge (mK4EFLV700MChmzwBsU+9yyY8n86Lu’… 36363 more characters) around 35k character per image, and i don’t think i should be storing allat in a db i don’t even think i could if i wanted what do i do ?
Expected: a much shorter url