Unable to migrate FILE messages

I’m trying to migrate messages from an old chat solution, but any FILE messages I send are being recorded as MESG messages with no file or message data. An example of what I’m sending:

{
      "type": "FILE",
      "user_id": "2fe7a6c4-7732-435f-9685-c5c5bcdf4bed",
      "timestamp": 1626940111933,
      "url": "https://testimages.nebo.global/dbd6a88a-3d8a-44bd-bb32-588cfbca10f5.jpg",
      "file_name": "dbd6a88a-3d8a-44bd-bb32-588cfbca10f5.jpg",
      "file_type": "jpg",
      "file_size": 171945,
      "custom_type": null,
      "data": null,
      "dedup_id": null
    }

Which then returns from a fetch

    {
      "message_survival_seconds": -1,
      "custom_type": "",
      "mentioned_users": [],
      "updated_at": 0,
      "is_op_msg": false,
      "is_removed": false,
      "user": {
        "require_auth_for_profile_image": false,
        "is_active": true,
        "role": "",
        "user_id": "2fe7a6c4-7732-435f-9685-c5c5bcdf4bed",
        "nickname": "Sam Ritchie",
        "profile_url": "https:\/\/testimages.nebo.global\/93fdd281-9f86-4b18-ab82-9af75331fa18.jpg",
        "metadata": {}
      },
      "file": {},
      "message": "",
      "data": "",
      "message_retention_hour": -1,
      "silent": false,
      "type": "MESG",
      "created_at": 1626940111933,
      "channel_type": "group",
      "mention_type": "users",
      "channel_url": "960b596a-04cd-4594-9f4c-52647a529c8e",
      "message_id": 6782468526
    }

would appreciate any feedback as to where I’m going wrong, thanks.

Hello, @sam Welcome to Sendbird Community and I can see that you are able to create a community post successfully now :slight_smile:

You’re not doing anything wrong. The thing is migration API does not support file messages (only if you have them from URL. Then yes, you point to the original URL).

But if you want to bring the file itself to the Sendbird server, then you need to use Platform API (a normal process for sending a FILE message).

Unfortunately, you cannot migrate FILE messages.

Let me know if this helps.

That’s correct, I am supplying a file URL, not a file (see the testimages.nebo.global URL in the migration message), as per the migration documentation - Migration | Chat Platform API | Sendbird Docs - which specifies how to migrate FILE messages.

However, the migration is not properly creating the message as FILE and returns me empty MESG messages instead.

Ah, sorry, I’ve spotted it - the properly should be message_type, not type as it is elsewhere.