Closed mindsolve closed 1 year ago
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 changed the import function to emulate the PartKeepr behavior and with the latest master commits it should work properly.
I also fixed some import bugs related to importing price information of Parts: Now currencies are correctly imported too. However in cases where there are the same price informations, but in different currencies, you will have to delete the prices in one of the currencies, when editing the part the next time. Part-DB automatically calculates prices in your favorite currency based on a defined exchange rate, and giving one price in multiple currencies could lead to conflicts.
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
Database entry in PartDB database: