-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Most JPG image attachments are not found after PartKeepr import #291
Comments
…like PartKeepr does, to ensure that all attachments are shown as available This fixes issue #291
…on of file attachments like PartKeepr does, to ensure that all attachments are shown as available This fixes issue #291
PartKeepr seems to use just the second part of the mimetype (e.g. "jpeg" of "image/jpeg"), when no explicit extension was set. That also meant that the file extension of the saved file were jpeg, even if the uploaded file had a jpg extension. I also fixed some import bugs related to importing price information of Parts: Now currencies are correctly imported too. |
Thanks a lot! Just to make sure I understand correctly: I have to re-import the PartKeepr Database for this fix to work? |
Yes. The change was in the import routine, so you have to redo the import (which also means that your database will be purged again). |
Describe the bug
After importing the data from PartKeepr, following the instructions, some attachments are not available/marked as "not found" in the UI.
Based on my research, the file extension does not match for JPEG images, where the
extension
field in the PartKeepr DB is empty. PartDB assumes the extension to be.jpg
, while PartKeepr used.jpeg
(at least in my instances). In the PartDB database, the filepath is recorded as%SECURE%/PartAttachment/6f8b40d2-1976-11e8-928b-0242c84f1654.jpg
, whereas the actual file lives at%SECURE%/PartAttachment/6f8b40d2-1976-11e8-928b-0242c84f1654.jpeg
.To Reproduce
Steps to reproduce the behavior:
File not found
marking on the attachmentExpected behavior
I expected PartDB to be able to view all attachments that were visible in PartKeepr.
Screenshots
Server Side
8bb8257e627eef0e77523980a6734cfa4e4cc098
8.1.2-1ubuntu2.11
Ubuntu 22.04.2 LTS
Desktop (please complete the following information):
Smartphone (please complete the following information):
n/a
Additional context
The text was updated successfully, but these errors were encountered: