Topic: [Feature] API Upload Duplicate Response

Posted under Site Bug Reports & Feature Requests

Requested feature overview description.
When uploading stuff over API that already exist, we should get information about the post ID.

Why would it be useful?
Well for one, it would work like website then and since server already checked and confirmed it exists, it could pass that information instead of just saying "It exists".
Then we wouldn't need to either search similar images, or try to upload via website to find the post(ID).
We could just jump straight to ID and do whatever with it.

What part(s) of the site page(s) are affected?
API

Updated by Mantikor

Chaser said:
Not a response to the feature request because I'm not sure if I'm allowed to decide on these, but you might be able to take the md5 of the file you are uploading and use that to get the post's information, eg:
https://e621.net/post/show.json?md5=61c93e4bdfe0f880fd7e0113c3c10f92

From there you can get the post id and other information as if you had the id.

Hmm, it doesn't work for cases when something was uploaded then deleted (I check if t exists, it says it doesn't, I try to upload still get error, so we're back to square one), and I'm not sure how I would make md5 out of image url.

Updated by anonymous

Munkelzahn said:
https://e621.net/help/show/api#posts_create
duplicate This post already exists in e621 (based on the MD5 hash). An additional attribute called location will be set, pointing to the (relative) URL of the original post.

isn't this what you're looking for?

When duplicate, server does not actually respond with any information other than
Message: "The remote server returned an error: (423) Locked."
Status : "Protocol Error 7"

Updated by anonymous

Alright, so I found a response, dunno why it's hidden like that lul

I guess the request is invalid then.

Updated by anonymous

DelurC said:
dunno why it's hidden like that lul

so that only 1337 haxors can access the secret information

Updated by anonymous

  • 1