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

Upload failure logging #7

Closed
ProximaNova opened this issue Jan 10, 2016 · 6 comments
Closed

Upload failure logging #7

ProximaNova opened this issue Jan 10, 2016 · 6 comments
Assignees

Comments

@ProximaNova
Copy link
Collaborator

"[##:##] Couldn't upload [filename]: this image already exists."
Is not always true, sometimes the image was too small, too large, corrupt, malicious...

I would be great if the upload failure logs would also say:
"[##:##] Couldn't upload [filename]: this image does not already exists."

@Seedmanc Seedmanc self-assigned this Jan 10, 2016
@Seedmanc
Copy link
Owner

From what I can see in the original uploader.js code, https://github.com/Seedmanc/Booru-mass-uploader/blob/gh-pages/js/uploader.js#L209 it only shows the "exists" message if server responds with "exists" as well. The problem is in the booru engine itself, upon encountering errors says "image either exists or is corrupted", without differentiating between the issues. It even says so for images that were deleted and uploaded again later.

@Seedmanc
Copy link
Owner

Upon closer inspection, booru does say somewhat different things depending on the situation and even when it links to a deleted duplicate, the link lacks the ID.

Based on that I improved the error reporting engine, it should now make more sense and even link to true duplicates. Please test.

@ProximaNova
Copy link
Collaborator Author

Great, it works! However it could still be improved a little:

If the image already exists (or previously existed) then it links to either an ID number or no ID number: &id=# or &id= (meaning it was deleted). Thus, ": image either already exists or is corrupted." should say "" (nothing), ": generic error.", or ": too big? too small? corrupted?"

Also maybe for when &id=[nothing] the error could display: "image was deleted"

@Seedmanc
Copy link
Owner

Done.

Say, you wanna be a collaborator here? I see you have to manually repeat my changes in your fork instead of pulling due to differences here and I might lack some booru-related knowledge to resolve proposed issues on my own. I never dealt with collaborations before though, do you have any experience?

Unless you want to continue maintaining your own version of course.

@ProximaNova
Copy link
Collaborator Author

OK, I will collaborate; it will work better that way.

This is my first account on this sort of websites so I don't have much experience; I created this account due to the enthusiasm I had towards seeing the uploader script working again.

@Seedmanc
Copy link
Owner

Added you as a collaborator, you can contribute here now. Keep in mind though that changes made to files other than the .user.js are live and will be immediately in effect for anyone using the userscript. Maybe eventually I'll figure out how to make a development branch compatible with gh-pages.

Tried to format the codebase and include some of your changes as well. There's probably not much need in putting every basic booru into include list now unless you're using those yourself. Users should be able to do that themselves following the pattern. Once we manage to add support for other engine boorus/modifications of Gelbooru, it would make sense to put examples of those into includes.

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

No branches or pull requests

2 participants