Closed yingying96 closed 2 years ago
Hi Team,
I'm trying to implement images_upload_handler on react js but i am having trouble seeing the blob content. However, i am able to get size, type and filenames of the blob.
images_upload_handler: function UploadHandler(blobInfo, success, failure) { // eslint-disable-next-line no-undef const imageFile = new FormData(); imageFile.append('files[]', blobInfo.blob()); const data = { thumbHeight: blobInfo.blob().thumbHeight, thumbWidth: blobInfo.blob().thumbWidth, file: imageFile, fileName: blobInfo.blob().fileName, fileType: blobInfo.blob().fileType, }; try { // const { data } = await axios.post(`${API_URL.storage}`, imageFile); // success(data.fileURL); } catch (error) { console.log(error); } }
Ref: INT-2941
Found the answer: blobInfo.base64()
Hi Team,
I'm trying to implement images_upload_handler on react js but i am having trouble seeing the blob content. However, i am able to get size, type and filenames of the blob.