File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
office365/sharepoint/actions Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1
1
from office365 .runtime .http .http_method import HttpMethod
2
+ from office365 .runtime .odata .odata_path_parser import ODataPathParser
2
3
from office365 .runtime .queries .service_operation_query import ServiceOperationQuery
3
4
4
5
@@ -23,5 +24,9 @@ def _process_response(response):
23
24
"""
24
25
file_object .write (response .content )
25
26
26
- super (DownloadFileQuery , self ).__init__ (web , r"getFileByServerRelativeUrl('{0}')/\$value" .format (file_url ))
27
+ # Sharepoint Endpoint bug: https://github.com/SharePoint/sp-dev-docs/issues/2630
28
+ file_url = ODataPathParser .encode_method_value (file_url )
29
+
30
+ super (DownloadFileQuery , self ).__init__ (web , r"getFileByServerRelativePath(decodedurl={0})/$value" .format (file_url ))
31
+
27
32
self .context .before_execute (_construct_download_query )
You can’t perform that action at this time.
0 commit comments