Assets not rendering after migration

I have…

  • [X ] Checked the logs and have provided the logs if I found something suspicious there

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [X ] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

We migrated the ttwo MongoDB’s : Squidex and SquidexAssets from development to the production environment succesfully. All the asset records showed in the Asset library on the UI, but they were all blank. This was expected because we have not moved the Assets on Dev to Prod. Then we moved the contents of the /Assets folder from Development to Production in the same location, but this then only changed the image blocks from transparent to to white.

You can download the image by clicking on the download button, but when it downloads the file seems to be corrupt:

Expected behavior

Moving the assets from one /Assets folder to another with the same DB should render the images.

Minimal reproduction of the problem

Mongodump and Mongorestore the db’s and manually move assets.

Environment

  • [ ] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ X] Self hosted with other version
  • [ ] Cloud version

Version: [VERSION] 4.

Browser:

  • [ ] Chrome (desktop)
  • [ ] Chrome (Android)
  • [X ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Others:

We are using the local Folder storage:

  "type": "Folder",
  "folder": {
    /*
     * The relative or absolute path to the folder to store the assets.
     */
    "path": "Assets"
  },

Could this be some encoding or path setting? We can succesfully upload any new images to the production environment without any issues.

Log file when downloading asseet:

“web”: {
“requestId”: “56c41c57-37f6-44ab-992b-739b301d9d29”,
“requestPath”: “/api/assets/APP_NAMEE/bd44aebd-2934-4317-96f9-fd9a469c0684/x-class.png”,
“requestMethod”: “GET”
},

Partly resolved: Initially we used FTP to download and then upload to the new server. This was a total of 5.3GB worth of files. Our suspicion is that images got corrupted. We instead compressed the entire Assets folder and migrated that over and uncompressed on the live environment. this seem to have worked although there are a few random ones which is still not rendering, but rather that than 3900 not showing.

Reason for taking this route: Timeout on backup and restore which a fix was deployed, but we are not able to update squidex on our side at this stage.

Request: Able to restore from the backup you download from you backups in the UI. When you then restore to be able to restore from file and not just URL

I would always suggest to make a manual backup, it is much faster. But you can also use file urls when restoring backups.

In general I would just store assets in S3 or so

I agree with the S3, but client is adverse to AWS for some reason. It was the timeout issue which we could not restore from URL on the prod environment which is why we used the manual backup and restore