Skip to content
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

[UploadUtilities] Fix 403 IQDB error when checking duplicates of local file upload #382

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

atomicBlaze21
Copy link

Fixes #360

Added check to determine if event is triggered by the file input or the URL textbox.

Added POST fetch to properly query the IQDB endpoint with the image file. (The APIQueryEntry type only accepts strings, numbers, and boolean. It can't handle form data or blobs, so I couldn't use the E621 API module.)

Fixed "Clear File" button not properly clearing the duplicate container.

Currently, the duplicate check doesn't fire when a file is drag/dropped into the file input, this adds the drop event to the listener. Also fixed the broken jQuery autofocus (bad selector, wrong trigger).
Fixed the "clear file" button not properly clearing dupesContainer. Added check for which input element triggered the event so that URLs and local files can be handled separately.
For some reason, I have to change version numbers whenever I make a new build, otherwise the injector seems to not recognize that a new build occurred. I forgot to revert this prior to my previous commit.
The APIQuery interface doesn't allow anything but strings so I'm gonna have to ad-hoc this whole thing. It's gonna be ugly, but I hope it'll work.
@atomicBlaze21 atomicBlaze21 changed the title Iqdb duplicate localfile [UploadUtilities] Fix 403 IQDB error when checking duplicates of local file upload Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IQDB 403 error on upload page
1 participant