Uploading with the same public id
I am trying to have an image accessible at a certain link: "/upload/public_id" and for that to be overrideable and for the new image to completely replace the old, and be accessible by the same link.
The problem I currently have is that the first image for a certain URL will work as expected but then further replace uploads with only be accessible via /upload/vXYZ/public_id. The first ever uploaded image will still be what loads at the link without the version extension.
This is the upload form:
And the signing function:
From my googling the only last solution is to version each upload with the same version number but whenever I try that I get an unauthorised error and the upload does not work.