metacatui
metacatui copied to clipboard
Can't remove file if file gets stuck in `l` status
I tried to add a file and ended up in a state I thought was kinda weird:
I realized that this happens if the file is 0 bytes. Maybe the checksum calculation is failing? No errors popped up in the Console.
Anyway, to guard against this edge case and potentially any others, it could be great if a file could still be removed if I get myself into this state (status: l). Thoughts?
I think there are two tasks here:
-
[ ] When a file fails to load correctly, we need to update the error icon tooltip content. Instead of "reading file..." it should have an error message. If the file is 0 bytes, we should catch that before attempting to calculate a checksum and tell the user that their file is empty.
-
[ ] We have been disabling the entire dropdown button because we don't want the user to enter entity metadata about a file when it wasn't loaded correctly, but we should still allow other options in the dropdown to work, particularly Remove.