koltyakov / gosip

⚡️ SharePoint SDK for Go
https://go.spflow.com
MIT License
145 stars 33 forks source link

Update content #74

Closed phhoef closed 9 months ago

phhoef commented 9 months ago

I was looking for a possibility to update the content of an api.File object. The pnpjs lib has a function setContent. Is there something similar for this library?

I would like to avoid deleting and re-creating the file as all metadata are missing ...

Thanks ...

koltyakov commented 9 months ago

Hey @phhoef,

Added file's SetContent method.

Please see how to use it: https://github.com/koltyakov/gosip/blob/master/api/file_test.go#L111