xwikisas / application-onlyoffice-connector

Edit attachments with OnlyOffice
GNU Lesser General Public License v2.1
0 stars 5 forks source link

File is not saved when the page where it's attached contains a / in its' URL name #20

Open AndreeaChi opened 3 years ago

AndreeaChi commented 3 years ago

There are times when a file edited using the OnlyOffice Connector App cannot be saved through a click on Save and Continue or Save and View options.

The error from the image below would appear: "Failed to save the page. Reason: Request error (uploading)". During the tests, I used an xlsx file with diverse content, then also an empty xlsx file, the error appearing on both cases. I also suspect that this error would occur no matter the doc type edited with the app.

local-saving-doc-test-request-error-uploading

When querying the file location the server answered "Malformed URL: the spaces section is invalid." with a 500 return code, thus nginx interprets it as a path instead of a character.

So, the source of the error was the fact that the page where the file was attached contained a / in its' URL name.

slash-page-name

The workaround for this was to rename the page location name that contained that file.