When uploading an image that already exists in Nextcloud, either by renaming a screenshot or by using the --file option, Nextcloud returns a 204 response code.
Need to do some more testing to see whether this overwrites or simply fails without doing anything. If it does overwrite it could simply be a matter of adding 204 to the checked responses and sharing anyway.
If it fails, we should rename the file (e.g. append -1, -2 etc.) and retry. That said, it may be better to check if the file exists first and automatically rename regardless of whether it overwrites or not.
When uploading an image that already exists in Nextcloud, either by renaming a screenshot or by using the
--file
option, Nextcloud returns a204
response code.Need to do some more testing to see whether this overwrites or simply fails without doing anything. If it does overwrite it could simply be a matter of adding
204
to the checked responses and sharing anyway.If it fails, we should rename the file (e.g. append
-1
,-2
etc.) and retry. That said, it may be better to check if the file exists first and automatically rename regardless of whether it overwrites or not.