-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Download file By server relative url in hebrew #470
Comments
I Created 4 Links with file name in hebrew: https://tenant.sharepoint.com/sites/mySite/_api/web/GetFileByServerRelativeUrl('/sites/mySite/Documents/סמך טקסט חדש.txt')/$value https://tenant.sharepoint.com/sites/mySite/_api/web/GetFileByServerRelativeUrl(@v)/$value?@v='/sites/mySite/Documents/סמך טקסט חדש.txt' All these links return the error, which i have in previous comment. |
I tried to repro this on my dev box and was unable - everything seemed to work as expected. Therefore, to help get to the bottom of what's going on I'll need the |
Actually, the error code ( |
It's GET request. Headers: |
I apologize for dropping the ball on this issue - are you still seeing it? If so, I'll need another |
Get File info: Works fine. Result: Get versions info: Works fine.Result: Get file content: Not working. Error response result: Message: Headers: Response: |
Not working. Error response result: Message: Headers: Response: |
Thanks @yuribb! |
Hi @yuribb, I have a couple of follow up questions:
|
How to reproduce: |
Definitely strange! Can you provide the URL that is going across the wire (i.e. that's URL encoded etc.)? When I'm trying to repro I'm using a URL that looks like:
|
this URL doesn't work too. WIth the same result. |
Not working. Error response result: Message: 'The remote server returned an error: (500) Internal Server Error.' Headers: Response: |
Hi @yuribb, I appreciate your patience while we try to figure this out! Since you mentioned that the requests without Thanks! |
Headers: Transfer-Encoding: chunked Response: { |
Hi @yuribb, can you try this URL instead and see if it works?
|
Message: The remote server returned an error: (500) Internal Server Error. Response: Headers: |
Ok, finally some good news... I have a repro! There's actually a slight difference between the persisted name and the name being requested - here's what I did. Created the file
Retrieved the file metadata - success!
Retrieved the file content - success!
Now here's where it gets tricky... we'll make the same request but include the special Retrieve the file metadata - success!
Retrieve the file content - failure?
Comparing the two names side-by-side so it's a little clearer:
So essentially, the name being used to retrieve the contents isn't the same name that was used to create the file, and so we're failing out. The confusing part is that the name is "close enough" that the metadata fetch works. I can confirm, however, that the OneDrive API does work for both metadata and content, and so once daemon/apponly support is available I'd definitely recommend switching over. |
I'm going to close this out as the "OneDrive API" that is documented by this repo works as expected. It's unlikely there will be any fixes to the older REST API at this point. |
@ificator I'm sorry, but it doesn't work. Message: 'The remote server returned an error: (500) Internal Server Error.' Headers: |
I found an issue #280 |
Hello. I use service account authentication to work with drive.
I tried to download file with name in hebrew by link:
"https://tenant.sharepoint.com/sites/mySite/_api/web/GetFileByServerRelativeUrl('/sites/mySite/%D7%91%D7%99%D7%95%D7%AA%D7%A8%2C%20%D7%A2%D7%9C%20%D7%90%D7%A3%20%D7%A9%D7%94%D7%90%D7%96%D7%95%D7%A8%D7%99%D7%9D/456/%D7%A1%D7%9E%D7%9A%20%D7%98%D7%A7%D7%A1%D7%98%20%D7%97%D7%93%D7%A9.txt')/$value"
But i've got an Internal Server Error with response:
"<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><m:code>-2130247151, Microsoft.SharePoint.SPException</m:code><m:message xml:lang="he-IL">אין אפשרות לפתוח את הקובץ "סמך טקסט חדש.txt".</m:message></m:error>'". How can i download this file?
The text was updated successfully, but these errors were encountered: