co-608: image fix#317
Conversation
| return (bufferImage = image.replace("data:image/jpg;base64,", "")); | ||
| } else if (image.includes("data:image/jpeg;base64")) { | ||
| return (bufferImage = image.replace("data:image/jpeg;base64,", "")); | ||
| } else if (image.includes("data:application/octet-stream;base64")) { |
There was a problem hiding this comment.
@manojSRawat The application/octet-stream type is shown for documents when mimetype is unknown ( I have seen this when I have opened file in spreadsheets and word docs) ? (Correct me if I am wrong). So considering it as an image will be wrong.
There was a problem hiding this comment.
I also face this kind of issue while uploading files on s3 without setting content-type.
@vaivk369 @vinukumar-vs could you please check if there is any change in upload functionality that might be related to this issue?
| }); | ||
| } else if (data.image) { | ||
| if (data.image.includes("data:image/")) { | ||
| if (data.image.includes("data:")) { |
There was a problem hiding this comment.
Why it was added & now why it is removed.
There was a problem hiding this comment.
data:image is the actual way of finding the image or not. Why it is removed now. How are you identifying the data is image or not?
There was a problem hiding this comment.
I can add a check based on file extension but agian that's not a correct way because user can modify the file extension and upload it.

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Type of change
Please choose appropriate options.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes in the below checkboxes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: