Answered by:
File name length issue with the REST APIs

Question
-
Hello,
I'm using REST APIs to upload a file to SkyDrive using PUT request. One of my customers is trying to upload a file with a Russian name. The file name length is 65 characters but when UTF-8 encoded it's length becomes 255 characters. The server responds with: "400 Bad Request" and the error message was:
The requested operation could not be completed. The requested file name '…. the encoded file name …' is not supported. A file name must contain fewer than 247 characters.
I think the server is checking the file name before decoding it.
Appreciate your help.
Thanks.Monday, March 5, 2012 8:43 PM
Answers
-
We have a fix for this issue, and will be deploying it in the near future.
Carl Hirschman
- Proposed as answer by Carl Hirschman Wednesday, March 7, 2012 2:10 AM
- Marked as answer by Navdeep Bawa-MSFTModerator Friday, March 23, 2012 5:28 AM
Wednesday, March 7, 2012 2:10 AM
All replies
-
Would you be able to share the name of the file (not the contents) with us, so that we can try to repro on our end?
Carl Hirschman
Tuesday, March 6, 2012 2:44 AM -
Hi,
I can reproduce it with the following example: (couldn't give the customer file name for privacy reasons)
производить_производить_производить_производить.docx
which when UTF-8 encoded produces:
%D0%BF%D1%80%D0%BE%D0%B8%D0%B7%D0%B2%D0%BE%D0%B4%D0%B8%D1%82%D1%8C_%D0%BF%D1%80%D0%BE%D0%B8%D0%B7%D0%B2%D0%BE%D0%B4%D0%B8%D1%82%D1%8C_%D0%BF%D1%80%D0%BE%D0%B8%D0%B7%D0%B2%D0%BE%D0%B4%D0%B8%D1%82%D1%8C_%D0%BF%D1%80%D0%BE%D0%B8%D0%B7%D0%B2%D0%BE%D0%B4%D0%B8%D1%82%D1%8C.docx
BTW, when I tried the SkyDrive website I was able to create and add files with this file name.
Hope this will help.
Tuesday, March 6, 2012 8:38 AM -
We have a fix for this issue, and will be deploying it in the near future.
Carl Hirschman
- Proposed as answer by Carl Hirschman Wednesday, March 7, 2012 2:10 AM
- Marked as answer by Navdeep Bawa-MSFTModerator Friday, March 23, 2012 5:28 AM
Wednesday, March 7, 2012 2:10 AM