sn-client
sn-client copied to clipboard
[BUG] Can't overwrite an existing file with a new, empty file
🐜 Describe the bug
If I upload a file in order to overwrite an existing file (with the same filename) on the server, the backend sends me a HTTP 204 response, but actually it does not modify the old file.
👉 Steps To Reproduce
- Upload a file
- Upload an empty file with the same name of the first one. You must enable "overwrite" flag.
- You should see that the response is OK, but no change has occurred on the server
The server side seems to be fixed, but now the client throws the following error when trying to upload an empty txt (0 bytes) file on top of an existing file with the same name:
SyntaxError: Unexpected end of JSON input
at Upload.uploadNonChunked (https://admin.test.sensenet.com/static/js/main.381ee0ec.js:1:381639)
at async Trace.callMethodAsync (https://admin.test.sensenet.com/static/js/main.381ee0ec.js:1:404499)
at async Upload.file (https://admin.test.sensenet.com/static/js/main.381ee0ec.js:1:380574)
Repository: https://insql-daily.test.sensenet.cloud