#55532Impexp: import the binary files being sys_file records to the right storage
Description
General: the Datahandler should not be used to import sys_file records.
The files and sys_file records should be written using the FAL API.
A) The FAL handling must be done before $this->writeRecords_records($pid);B) import contains a sys_file_storage record:
- Check if driver is Local
> * Not Local: use Default storage for import
> * Local: check for identical storage (same basePath/pathType)
> > * identical: use the present one
> > * not identical: import, save new ID and use it (add option to force the default)
D) Loop through sys_file records
- init storage
- use imported storage, use identical present one, use the default one or fetch the best one for the identifier
- before save: check if there is a file with same identifier and same same hash
- save map from old ids to new ids
E) remove sys_file entries from header records
Reviews 1
Related issues 6
- Task #49227Files missing in import/export
- Task #55431Impexp: file contents of sys_file are not included in export
- Task #55526Impexp: missing fields of sys_file on import
- Task #55528Importing a identical sys_file_storage have to be prevented
- Task #55906Impext: Don't clear relation field data for sys_file_reference uid_local
- Bug #81277Import tests with side effects