- Issue created by @kamalMaroc
- Assigned to nginex
- πΊπ¦Ukraine nginex
Will be developed for 1.4.x and backported to 1.3.x
- @nginex opened merge request.
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 12:51pm 10 September 2023 - πΊπ¦Ukraine nginex
There are two ways of external assets support:
1. When exporting content, force external assets download and put them into generated zip.
2. When importing content, force external assets download and save the files into proper uri.I've provided MR that supports 2nd option. Please check it, in my case everything worked well when I used s3 with two different root folders for different environments.
- @nginex opened merge request.
- π²π¦Morocco meryem dibe
Hello,
For the first option i have edited the function to force download of the assets
here is my code :protected function addAssetsToZip(ArchiverInterface $zip): void { $assets = $this->privateTempStore->get('export.assets') ?? []; foreach ($assets as $file_uri) { // Extract the relative path from the URI. $file_relative_path = explode('://', $file_uri)[1]; // Download the file and add it to the ZIP archive. $file_contents = file_get_contents($file_uri); if ($file_contents !== false) { // Add file contents to the ZIP archive with the same relative path. $zip->getArchive()->addFromString("assets/{$file_relative_path}", $file_contents); } } // Clean up the storage after we exported assets to the zip. $this->privateTempStore->delete('export.assets'); }
I've created a patch for it external_assets.patch
Now im trying to import content and uploading assets (in my assets folder in the zip file ), but it seems like we only can upload files from the yml file.
Any ideas to manage to upload files using the asset folder ? - πΊπ¦Ukraine nginex
Thanks for the patch @Merrydbe,
I also did fix the issue you had, please check the updated patch.
-
nginex β
committed aa639cd6 on 1.4.x
Issue #3385412: Add better support for external files during content...
-
nginex β
committed aa639cd6 on 1.4.x
-
nginex β
committed 8aebdbf8 on 1.3.x
Issue #3385412: Add better support for external files during content...
-
nginex β
committed 8aebdbf8 on 1.3.x
- Status changed to Fixed
over 1 year ago 8:49pm 13 September 2023 - πΊπ¦Ukraine nginex
The fix seems wotking, going to create a new release.
Thanks for the support.
Automatically closed - issue fixed for 2 weeks with no activity.