URL obrazu do składania JS
const url = "https://cdn.shopify.com/s/files/1/0234/8017/2591/products/young-man-in-bright-fashion_925x_f7029e2b-80f0-4a40-a87b-834b9a283c39.jpg"
const fileName = url.substring(url.lastIndexOf('/')+1)
fetch(url)
.then(response => response.blob())
.then(blob => new File([blob], `${fileName}`, {
type: blob.type
}))
.then(file => {
setFileData(file);
setPreview(URL.createObjectURL(file));
})
Lucas Juan