Open liab25 opened 3 years ago
Pretty sure this is a bug, in Set-GSDocContent (and Add-GSDocContent) the $service object is constructed with $serviceParams in the Begin
block but the $serviceParams variable isn't defined until the Process
block.
However once I manually defined $serviceParams I was able to set and add content in a simple google doc, so that part appears to be functioning, are you sure you passed in content to add?
@FISHMANPET - yeah i noticed that in those functions too. I was a bit confused but thought maybe i missed something there. As for the actual updating of the file, I was using the wrong function. The files I was testing against were .txt files not google docs. After going through the function documentation several times, i realized those are only for updating google docs. Once i swapped to the Update-GSDriveFile function, everything worked out great.
This has been fixed in https://github.com/SCRT-HQ/PSGSuite/commit/eaf4bf213c7a451c94983cba7c523833ac0d893a, which has also been merged into https://github.com/SCRT-HQ/PSGSuite/tree/release/2.37.0, so the fix should in theory be deployed when the 2.37.0 release is made.
Describe the bug Running $localFile | Set-GSDocContent -FileId 'fake_file_id' fails with
To Reproduce Steps to reproduce the behavior:
Not sure if it matters, but i only granted my service account access to the drive API because i only need to be able to read and write to specific shared drives.
Also after manually defining the $serviceParams variable, verbose output shows an attempt to update the contents with no errors however the file remains the same without the expected new text updates.