Is there any library available that would allow me to upload both HEIC and HEIF photos, or at least convert them to another format for preview purposes?
I am currently using the file upload component from Ant Design (antd) in my project. Additionally, I’m utilizing the heic2any library to convert HEIC files to JPG, and it works well for its intended purpose. Here is the code I’m using:
const handleChange = (info) => {
// Code to handle file upload and conversion
};
My problem arises when I encounter a HEIF file. The heic2any library doesn’t support HEIF format; it only handles HEIC files. Moreover, I’m unable to determine the file type during upload, as both HEIF and HEIC files do not seem to have a recognizable type attribute in their data when uploaded. This lack of file type recognition makes it difficult to validate and process these files correctly.