Closed Scarwolf closed 4 years ago
Sorry but there is a reason that the delete code is only shown for images that are new.
If I would merge your PR then anyone could delete any image just by re-uploading it and receiving the delete code.
The delete code is only given out to the person who first uploads a unique image.
If you're hosting yourself you can add the master delete code that's one delete code for all images
Creating a symlink to a latest existing copy could do the job if there is a some additional logic behind.
Hey there,
I was integrating Pictshare's API in the Screenshot Tool ShareX and struggling for an hour, wondering why the Script did not return the
delete_url
param.Eventually I found out this was related to Sharex Uploading the same file over and over again to test and the /upload endpoint returning a different JSON Structure for files that have been uploaded before.
So I created this PR which returns the Same values as if the file uploaded would not have been uploaded before.