Skip to content

slides: insert-image/replace-slide fail with publishOutNotPermitted on restricted tenants — need a by-URL path #825

Description

@sebsnyk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions