Some images don't load from the Amity server

Hi all,

Since 2 3 days ago, some images don’t load in our communities. Can someone help us?
I get the link to those images from FileRepository.getFile(), but when I want to render them in our React-Native application, I can’t.

Here is a part of the data:

{“fileId”: “1acb856983ba4982bb71e3067d4720cd”, “fileURL”: “https://api.us.amity.co/api/v3/files/1acb856983ba4982bb71e3067d4720cd/download?size=medium”}

{“fileId”: “c6f02484d6644a9d9ba492dac8ff381a”, “fileURL”: “https://api.us.amity.co/api/v3/files/c6f02484d6644a9d9ba492dac8ff381a/download?size=medium”}

Hi @Tech ,

May I please confirm if this is still for platform react native vers. 0.70.6?

Thank you

Yes, we are using “react-native”: “0.70.6”, but I think it’s not about the react-native version.
Because I can not even open the Image URLs via the browser on my laptop. Can you see the images of the above links?

Thank you, we’re investigating for you

@Tech ,

We’re still unable to reproduce this, may we please confirm :

  1. Does it happen every time or happen occasionally?
  2. If you upload the same file again, can you open it

Thank you,
Amity Support

Hi,

I think the problem is in the upload process.
I am not sure, but maybe it’s for the HEIC format of images on iPhones and Android devices with a high-quality camera.

Or maybe, the problem is related to the size of an image.

I think I have found the problem:

I can upload this image with these properties correctly:

{
    "fileObject": {
        "_data": {
            "size": 2505426,
            "offset": 0,
            "blobId": "F5897167-ABCD-4AFB-99C3-D2C5C91B422A",
            "type": "image/jpeg",
            "name": "IMG_0003.JPG",
            "__collector": {}
        },
        "uri": "file:///Users/mohammad/Library/Developer/CoreSimulator/Devices/B1DD9235-EB39-4D4E-B368-97DB163C4D03/data/Media/DCIM/100APPLE/IMG_0003.JPG",
        "name": "IMG_0003.JPG",
        "type": "image/JPG"
    },
    "formData": {
        "_parts": [
            [
                "files",
                {
                    "_data": {
                        "size": 2505426,
                        "offset": 0,
                        "blobId": "F5897167-ABCD-4AFB-99C3-D2C5C91B422A",
                        "type": "image/jpeg",
                        "name": "IMG_0003.JPG",
                        "__collector": {}
                    },
                    "uri": "file:///Users/mohammad/Library/Developer/CoreSimulator/Devices/B1DD9235-EB39-4D4E-B368-97DB163C4D03/data/Media/DCIM/100APPLE/IMG_0003.JPG",
                    "name": "IMG_0003.JPG",
                    "type": "image/JPG"
                }
            ]
        ]
    }
}

But I can not download an Image with these properties:

{
    "fileObject": {
        "_data": {
            "size": 2808983,
            "offset": 0,
            "blobId": "14B1EFDE-8CD3-4E92-A09B-90CFE1FADE1F",
            "type": "image/heic",
            "name": "IMG_0006.HEIC",
            "__collector": {}
        },
        "uri": "file:///Users/mohammad/Library/Developer/CoreSimulator/Devices/B1DD9235-EB39-4D4E-B368-97DB163C4D03/data/Media/DCIM/100APPLE/IMG_0006.HEIC",
        "name": "IMG_0006.HEIC",
        "type": "image/HEIC"
    },
    "formData": {
        "_parts": [
            [
                "files",
                {
                    "_data": {
                        "size": 2808983,
                        "offset": 0,
                        "blobId": "14B1EFDE-8CD3-4E92-A09B-90CFE1FADE1F",
                        "type": "image/heic",
                        "name": "IMG_0006.HEIC",
                        "__collector": {}
                    },
                    "uri": "file:///Users/mohammad/Library/Developer/CoreSimulator/Devices/B1DD9235-EB39-4D4E-B368-97DB163C4D03/data/Media/DCIM/100APPLE/IMG_0006.HEIC",
                    "name": "IMG_0006.HEIC",
                    "type": "image/HEIC"
                }
            ]
        ]
    }
}

The problem seems to be for the format of images.
Can you support .HEIC format as an Image ?

We do support HEIC, but we don’t support HEIC with HDR. Therefore, the best solution would be converted the file into normal image before upload