S3 bucket is configured but i am still getting the CORS error while previewing the images.
Preparing the files payload
function readyPayload(){
setFiles([])
imgs && imgs.sort((a, b) => parseInt(a.orderId) > parseInt(b.orderId) ? 1 : -1)
.map((item, idx) => {
setFiles(
prevState => [
...prevState,
{
source: item.imageUrl,
// options: {
// type:"local"
// }
}
]
)
})
}
The Filepond component
<FilePond
files={files}
allowMultiple={true}
allowReorder={true}
onupdatefiles={setFiles}
onreorderfiles = {setFiles}
onremovefile = {(error, file) => deleteImgs(file.filename)}
imagePreviewHeight = "125px"
/>