koltyakov / gosip

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

Update content #74

Closed phhoef closed 8 months ago

phhoef commented 8 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 8 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