s-KaiNet / sp-request

Simplified SharePoint HTTP client
52 stars 9 forks source link

How to get file content wit sp request, #16

Closed sanjeev2315 closed 4 years ago

sanjeev2315 commented 4 years ago

Hi,

I have tried using both sp-request and sp-download but i could not get actual sharepoint file data in binary.

  1. Problem with sp-download is , it downloads the file to disk directly but i can not afford that as it is performance issue for me, i need file binary stream, not sure how to do that.

  2. With sp-request, i tries using getfilebyserverrelativeurl(url)$value but it is giving me a whole big xml/xsd(lot of metadata) kind of structure but not binary content, is there any way that i get binary .doc file content with any of these libraries, I have spent lot of time but could not figure out how to do that.

s-KaiNet commented 4 years ago

Hi,

Please checkout this method from sppull library. I guess that's something you're looking for.

saurabh-lodha-16 commented 4 years ago

@sanjeev2315 were you able to solve the issue ? I want to do a similar functionality in my application. If possible can you please share the working method. Thanks.

sanjeev2315 commented 4 years ago

@sanjeev2315 were you able to solve the issue ? I want to do a similar functionality in my application. If possible can you please share the working method. Thanks.

Yes, I written the same kind of function which @s-KaiNet mentioned

s-KaiNet commented 4 years ago

Glad you guys resolved the issue. I'm closing it, please feel free to reopen.

MDangleben commented 4 years ago

How was this resolved using sp-request? Is got.stream exposed anywhere?