Closed Tiago-Altus closed 4 years ago
Hey @Tiago-Altus,
Either encodeURIComponent
or %25
works for me.
@koltyakov Interesting... you see, my file also downloads to the specified download path but when I open the file it has error xml written in it.. It says the following in the hello%.txt file:
<?xml version="1.0" encoding="utf-8"?><m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><m:code>-2130575338, Microsoft.SharePoint.SPException</m:code><m:message xml:lang="en-US">The file /sites/pathtosite/Shared Documents/path/hello%25.txt does not exist.</m:message></m:error>
Does sppull use ServerRelativeUrl or ServerRelativePath? I think if it used ServerRelativePath with [decodedUrl] this may work.
It uses ServerRelativePath
and ServerRelativeUrl
as a fallback method (for SP versions which didn't have *Path methods).
Oh, I'm getting the same behavior with XML error body, as I randomly picked an svg
file by a brief look at the body I false positively considered it was ok. Will check.
@Tiago-Altus, seems I've nailed the issue, please check just published sppull@2.6.7
. Does it work for you?
Yep, it works now.
sppull version 2.6.6
I am trying to download a filename called "hello%.txt" from SharePoint using sppull. In the sppull options I tried the 2 following ways: Encoded the file name
Non-encoded file name
When I encode I get the error: The file /pathtofile/hello%25.txt does not exist Without encoding I get the error: Unable to pull from SharePoint: TypeError: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined'
Any ideas if % is supported with sppull, or am I getting something wrong with the sppull options?