Problem
gog slides insert-image (and replace-slide) upload the image to Drive and then make it publicly shareable so Slides can fetch it. On tenants where Drive public sharing is disabled by policy, this fails:
gog slides insert-image --width=120 <deck> <slideId> /tmp/x.png
# Google API error (400 publishOutNotPermitted)
This makes image insertion impossible on locked-down org tenants. The Docs side has a more flexible path (insert-image --at can take a URL). Slides has no by-URL option, so the only workaround is to self-host the image (e.g. a temporary tunnel) and call the Slides API createImage with that URL directly — which Google fetches and caches without anything being shared from Drive.
Repro
On a tenant with Drive public sharing disabled: the command above returns 400 publishOutNotPermitted.
Suggested
- Add a by-URL insert path for
gog slides insert-image (accept an http(s) URL, pass it straight to createImage), mirroring Docs.
- Or document the publish requirement + the URL workaround.
gog 0.27.1.
Problem
gog slides insert-image(andreplace-slide) upload the image to Drive and then make it publicly shareable so Slides can fetch it. On tenants where Drive public sharing is disabled by policy, this fails:This makes image insertion impossible on locked-down org tenants. The Docs side has a more flexible path (
insert-image --atcan take a URL). Slides has no by-URL option, so the only workaround is to self-host the image (e.g. a temporary tunnel) and call the Slides APIcreateImagewith that URL directly — which Google fetches and caches without anything being shared from Drive.Repro
On a tenant with Drive public sharing disabled: the command above returns
400 publishOutNotPermitted.Suggested
gog slides insert-image(accept anhttp(s)URL, pass it straight tocreateImage), mirroring Docs.gog 0.27.1.