You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When importing medial files exported using the Sitecore Migration Tool, I discovered that the folder context is different when importing Media_Files vs AssetFiles.
To Reproduce
Steps to reproduce the behavior:
Import Json serialized Media_File objects using relative FilePaths like this:
".\Files\NEWSWIRE\thumbnails24\1NPHW.png"
Import Json serialized AssetFile objects using relative DataSourcePath like this:
".\Files\NEWSWIRE\thumbnails24\1NPHW.png"
Result
When importing Media_File objects, the files will be imported using the root of the target CMS project's WebApplicationPhysicalPath.
When importing AssetFiles object, the files will be imported using the environment, current directory.
When importing content using UTM, this causes the asset folder to be created in the same directory as the JSON and medial files exported by the Sitecore migration tool, instead of in the WebApplicationPhyiscalPath/assets folder.
Work around
Update the AssetFile.FilePath of all assets to be an absolute path, so that the current directory can be the same as the WebApplicationPhysicalPath. This prevents the assets from being added to the wrong folder while being imported.
Expected behavior
When assets are imported, files should be saved under the WebApplicationPhyiscalPath not under the Envirobment.CurrentDirectory.
The text was updated successfully, but these errors were encountered:
@diger74 - I have both paths set, but to be clear: When importing media library images using UMT, I was allowed to set the current directory to the location of my import files instead of the WebApplicationPhyiscalPath. That was convenient, because it allowed the FilePath property in my JSON files to use a relative path.
However, when importing asset files, the current directory must be the WebApplicationPhysicalPath. The logic between importing media files and content assets seems to be different.
Hi @bluemodus-mwills, yes this is how content item asset import behaves now. It is unfortunately not related to UMT, but rather to how XbyK API behaves. I will create reproducible sample and forward issue. Lets keep this open to track progress.
Describe the bug
When importing medial files exported using the Sitecore Migration Tool, I discovered that the folder context is different when importing Media_Files vs AssetFiles.
To Reproduce
Steps to reproduce the behavior:
Import Json serialized Media_File objects using relative FilePaths like this:
".\Files\NEWSWIRE\thumbnails24\1NPHW.png"
Import Json serialized AssetFile objects using relative DataSourcePath like this:
".\Files\NEWSWIRE\thumbnails24\1NPHW.png"
Result
When importing Media_File objects, the files will be imported using the root of the target CMS project's WebApplicationPhysicalPath.
When importing AssetFiles object, the files will be imported using the environment, current directory.
When importing content using UTM, this causes the asset folder to be created in the same directory as the JSON and medial files exported by the Sitecore migration tool, instead of in the WebApplicationPhyiscalPath/assets folder.
Work around
Update the AssetFile.FilePath of all assets to be an absolute path, so that the current directory can be the same as the WebApplicationPhysicalPath. This prevents the assets from being added to the wrong folder while being imported.
Expected behavior
When assets are imported, files should be saved under the WebApplicationPhyiscalPath not under the Envirobment.CurrentDirectory.
The text was updated successfully, but these errors were encountered: