mirror of
https://github.com/werkraum-media/events.git
synced 2024-11-21 23:16:09 +01:00
Do not download already existing files during import (#26)
The usual use cases right now would involve a new file with a new URL. That way we don't need to download existing files again. That reduced network traffic, execution time and resource usage.
This commit is contained in:
parent
d9fef5367a
commit
7b3bbf6d9d
3 changed files with 3 additions and 5 deletions
|
@ -93,11 +93,7 @@ class FilesAssignment
|
|||
|
||||
if ($importFolder->hasFile($orgFileNameSanitized)) {
|
||||
$this->logger->info('File already exists.', [$orgFileNameSanitized]);
|
||||
} else {
|
||||
$this->logger->info('File does not exist.', [$orgFileNameSanitized]);
|
||||
}
|
||||
|
||||
if ($filename = $this->loadFile($fileUrl)) {
|
||||
} elseif ($filename = $this->loadFile($fileUrl)) {
|
||||
$this->logger->info('Adding file to FAL.', [$filename]);
|
||||
$importFolder->addFile($filename, basename($fileUrl), DuplicationBehavior::REPLACE);
|
||||
} else {
|
||||
|
|
|
@ -34,6 +34,7 @@ Features
|
|||
* Handle changes to images for events.
|
||||
The import of destination data one only added new images but kept existing images untouched.
|
||||
This was now improved. The import now will update, remove and re-sort images as well.
|
||||
Existing image files won't be downloaded again, only information and position are updated.
|
||||
|
||||
Fixes
|
||||
-----
|
||||
|
|
|
@ -21,6 +21,7 @@ The import will:
|
|||
* Flush all dates for updated events and re-create all dates.
|
||||
|
||||
* Add and update all images for updated and added events.
|
||||
Existing image files won't be downloaded again, only information and position are updated.
|
||||
|
||||
The import will not:
|
||||
|
||||
|
|
Loading…
Reference in a new issue