Kentico/xperience-by-kentico-universal-migration-tool

Subsequent import of the same media files makes them not displayable

Closed this issue · 2 comments

Kentico.Xperience.UMT package version - 1.0.1

Reproduction steps:

  1. Import one or more media files into Xperience by Kentico instance
  2. Load media library interface and make sure you can see these media files
  3. Import the same media files again
  4. In the media library interface these files will become grey rectangles, trying to open media file by URL /getmedia returns 404 error

What I've discovered, during the subsequent imports FilePath attribute removes media file extension.
I.e. if after the first import media file FilePath was "Images/Main Images/Homepage/solutions-1-638x380.jpg", then after the second import it changes to "Images/Main Images/Homepage/solutions-1-638x380" which breaks the interface to display it.

@diger74 i have failed to reproduce this issue, sample used for reproduction:
media_sample.json - please check if there is not some evident difference.

To further progress with this issue, i will need serialized model used for import (to check values/serialized model). for example:
image.
Serialization can be done by calling IImportService.SerializeToJson method where argument is UMT model or IEnumerable of UMT models.

Hi @tkrch
Apologies, apparently there was a bug in my export code that led to this behavior. I fixed it now and close this issue. Thanks for your comment it pushed me in the right direction.