Baboo7 / strapi-plugin-import-export-entries

Import/Export data from and to your database in just few clicks.
175 stars 86 forks source link

[BUG] Not able to import pictures #177

Open piotrwalczak1 opened 6 months ago

piotrwalczak1 commented 6 months ago
[
    {
        "error": {
            "details": {
                "errors": [
                    {
                        "path": [],
                        "message": "4 relation(s) of type plugin::upload.file associated with this entity do not exist",
                        "name": "ValidationError"
                    }
                ]
            },
            "name": "ValidationError",
            "message": "4 relation(s) of type plugin::upload.file associated with this entity do not exist",
            "level": "\u001b[31merror\u001b[39m",
            "timestamp": "2024-02-15 09:28:28.516"
        },
        "data": {
            "id": 5,
            "name": "content",
            "pathId": 5,
            "path": "/5",
            "createdAt": "2023-11-24T07:46:02.201Z",
            "updatedAt": "2023-11-24T07:46:02.201Z",
            "parent": null,
            "children": [],
            "files": [
                4,
                5,
                6,
                7
            ],
            "createdBy": null,
            "updatedBy": null
        }
    }
]

To Reproduce I am using s3 integration with aws. I exported 1 collection which has custom fields with picture link added (stored in aws s3) using EXPORT and then IMPORT this collection to new instance. When importing data is added, but the files to s3 are added but have 255B only (original is 176KB).

Expected behavior Import successful and files added to s3

sl1mpshady commented 3 months ago

following up on this issue. the id of the files exported are 265, 287, 288 but when the import is done, it's change to some ids. so the following doesnt work as the file ids [265, 287, 288] does not exist

"plugin::upload.folder": {
      "1": {
        "id": 1,
        "name": "Example Folder",
        "pathId": 1,
        "path": "/1",
        "createdAt": "2024-01-19T06:51:34.469Z",
        "updatedAt": "2024-01-19T06:51:34.469Z",
        "parent": null,
        "children": [],
        "files": [265, 287, 288],
        "createdBy": null,
        "updatedBy": null
      }
    }