omeka-s-modules / FileSideload

GNU General Public License v3.0
2 stars 3 forks source link

File is ingested even if copy to temporary directory fails #36

Closed jajm closed 1 month ago

jajm commented 1 month ago

https://github.com/omeka-s-modules/FileSideload/blob/f6bf93056bbc58f1e7672372d7a5418b9216a7c7/src/Media/Ingester/Sideload.php#L113

Return value is not checked so the ingestion process continue even if the copy failed.

Happened to me with a big file. There was not enough space left in /tmp so Omeka ingested a truncated version of the file. I think the same problem exists with SideloadDir

To reproduce:

  1. Create a 2M temporary fs: sudo mount -t tmpfs -o size=2M tmpfs ~/tmp
  2. Change temp_dir to ~/tmp in local.config.php
  3. Try to ingest a file bigger than 2M
jimsafley commented 1 month ago

Thanks for the bug report!

jajm commented 4 weeks ago

Thank you for fixing it! :-)