fixed vendor-uploads.php conflicts

This commit is contained in:
Erwin Galang 2024-02-16 10:00:30 +08:00
parent 155cd3df6e
commit 152d9832ff
1 changed files with 0 additions and 18 deletions

View File

@ -485,24 +485,6 @@ $array = json_decode($result, true);
formData.append('category', 'product');
formData.append('image', resizedFile);
fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/upload_image', {
method: 'POST',
body: formData
})
.then(response => {
if (response.ok) {
return response.json();
} else {
console.error('File upload failed');
throw new Error('File upload failed');
}
})
.then(result => {
const filename = result.filename;
const payload = {
product_image: `https://<?php echo $_SESSION["data_endpoint"]; ?>/images/storage/product_uploads/${filename}`,
};
fetch('https://api.obanana.shop/api/v1/upload_image', {
method: 'POST',
body: formData