replaysMike / Binner

Open source parts inventory system for makers, electronics hobby, and professional engineers
https://binner.io
GNU General Public License v3.0
261 stars 41 forks source link

[Bug]: Problems deleting/replacing user files #232

Closed parzival closed 4 months ago

parzival commented 1 year ago

Binner version

2.6.0

Operating System

Ubuntu 20.04

Describe the bug and the steps to reproduce it

It appears that the 'delete file' button is not functional, at least for datasheets. Creating a part and uploading a datasheet works okay, and the file is correctly placed in the [User Files]/Datasheets directory. However, the red x 'delete' button does not appear to work in Firefox 113 for MacOS, nor in Safari 16.3.

Potentially more of an issue is that replacing the file (by dragging a new file) does bring up the dialog box to delete the existing file. If the deletion is confirmed, the new file apparently updates, although the filename listed was incorrect until I leave the page and come back. However, the new file does not load (giving the 404 JSON data instead when clicking on the datasheet preview). It seems to be uploading the new file before deleting the old one, as when I do this, the [User Files] directory has a file with the name PN-Datasheet-1.pdf, which is likely why it cannot load it. Replacing the file a second time works (this is likely because it uploaded it to PN-Datasheet.pdf, as that file was not currently in the directory).

Also, a feature request would be to show a dialog or better error message if the file cannot be found, instead of the JSON error data.

(I placed brackets around [User Files] as my settings have changed this from the default. I would hope that does not cause this problem, but it could be a reason.)

Would you like to attach your appsetings.json configuration?

No response

Screenshots or Videos (Optional, but they help!)

No response

Are you able to contribute a PR? (No is ok!)

None

Lucard-AUT commented 11 months ago

I was able to delete an attached datasheet by doing the following two steps:

Then the delete-dialog appears and i can click "OK", the datasheet is deleted. Also the "cancel"-button on tis dialog is not working

Tested on Win10, Binner v2.6.0

replaysMike commented 4 months ago

Issue is fixed, will appear in v2.6.3