REST Api is case sensitive on key values while it shouldn't

Hi! I’ve been trying to upload files to seafile using the rest api and ran into issues until I discovered that one of my keys had a lower case letter while seafile was expecting an upper case one. I believe that keys should be case insensitive however.

The exact error I had was (but I think case insensitivity should be checked everywhere) was while sending a file and creating the multipart data.

One of my line was

“Content-disposition: form-data; name="parent_dir"”

instead of

“Content-Disposition: form-data; name="parent_dir"”

which caused a bad request error

What API do you use with this error?

I’m using the upload file link that I receive from the call to
https://seafileserver/api/v2.1/via-repo-token/upload-link/

After reciving the upload link, you may upload files by API such as Upload file
And, the content-disposition data is not required though. Maybe I do not know how you use the
API for file uploading, could you please give us the details of the whole http requests codes。

Furthermore, when I am using the thirdparty API tools for testing, the Capitalized content-disposition may be a standard input.

I understand how uploading a file works, my post is about the content of the POST request sent to upload a file.
I’m using a tool that creates the request for me, and it turns out it didn’t capitalized the D in Content-Disposition resulting in an obscure “bad request” error message.
I believe that capitalization is supposed to be optional and if that’s the case, then seafile should handle it as such

For more standard http protocol support, you can enable and use go fileserver instead. We don’t plan to change the C fileserver a lot with regards to http protocol details, to avoid unexpected bugs. seafile.conf - Seafile Admin Manual

I guess go fileserver replaces C fileserver in handling the API calls then ? I will have to ask the admin to activate it then if possible

Yes file upload and download APIs will be handled by Go fileserver if you enable it.

Should we configure our servers to use the go implementations? Do new installations these days default to using that one?

Are there any cases where users should prefer the older C server over go?

If the C fileserver works without problems you can continue to use it. The go fileserver has been used by some large deployments and we think it’s production ready. There may still be some minor bugs though.

Some point in the future we’ll make go fileserver the default. For now we want a more gradual switching procedure, to collect more feedbacks from users.