- Issue created by @murz
Now when we export files, we store the file path in two ways, like this:
custom_fields:
field_image:
-
uri: 'public://2025-02/my-file.jpg'
url: 'http://my-project.localhost/sites/default/files/2025-02/my-file.jpg'
alt: 'My file'
title: ''
But storing URLs with local hosts like 'http://my-project.localhost/' doesn't make sense, because it will be 100% unavailable on another environment where we import the content.
1. Export a node with an image, attached to the field_image field.
2. See the url path in the exported YAML file.
I think when we successfully exported the file to the "assets" directory, it is not needed to save the "url" field to the exported yaml, because the file will be available.
So, store the "url" only when we can't save the file locally.
Active
1.4
Code