Importing from a folder in a SMB share fails #59

Closed
opened 2023-01-23 16:35:56 +00:00 by rishighan · 2 comments
rishighan commented 2023-01-23 16:35:56 +00:00 (Migrated from github.com)

Assuming that you have a:

  1. folder mounted as a SAMBA share,
  2. you perform a clean import in ThreeTwo from the Import page, and,
  3. browser tab remains open, internet connection unabated,

the import fails cryptically.

Assuming that you have a: 1. folder mounted as a SAMBA share, 2. you perform a clean import in ThreeTwo from the `Import` page, and, 3. browser tab remains open, internet connection unabated, the import fails cryptically.
rishighan commented 2023-03-15 15:52:54 +00:00 (Migrated from github.com)

Troubleshooting this further, specifically around the files @nstephenh shared with me:

  1. The use of sanitize method here was causing illegal characters to be removed from the filename, subsequently breaking functionality that attempts to extract the said file into the covers folder.
  2. A .cbr file, which in reality was a .cbz file tripped up the uncompression code, failing out and terminating the queue.
Troubleshooting this further, specifically around the files @nstephenh shared with me: 1. The use of `sanitize` method [here](https://github.com/rishighan/threetwo-core-service/blob/8b814c0ac5f60a2a575b92f02eb217635bb1ed31/utils/uncompression.utils.ts#L165) was causing _illegal_ characters to be removed from the filename, subsequently breaking functionality that attempts to extract the said file into the `covers` folder. 2. A `.cbr` file, which in reality was a `.cbz` file tripped up the uncompression code, failing out and terminating the queue.
rishighan commented 2023-03-15 15:59:44 +00:00 (Migrated from github.com)

The aforementioned findings are still not severe enough to warrant terminating the import queue. Ideally:

  1. The uncompression code should not rely on filename extensions, and use MIMEtype instead to infer if the file is a .zip or a .rar
  2. Failures to uncompress, parse the files should throw an error which gets pushed into an array of issues and then the final array should be caught. @nstephenh Please feel free to weigh in.
The aforementioned findings are still not severe enough to warrant terminating the import queue. Ideally: 1. The uncompression code should not rely on filename extensions, and use MIMEtype instead to infer if the file is a `.zip` or a `.rar` 2. Failures to uncompress, parse the files should throw an error which gets pushed into an `array` of issues and then the final array should be caught. @nstephenh Please feel free to weigh in.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: frishi/threetwo#59