Skip to content

Instantly share code, notes, and snippets.

Last active February 12, 2024 17:34
  • Star 17 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save samuelkarani/d850971294629298d4a350d3913607dd to your computer and use it in GitHub Desktop.
export const getThumbnail = (id, size = 300) =>
export const getIcon = (mimeType) =>
export const getFile = (id) => `${id}`;
const downloadFile = (id) =>
export const webViewerURL = (url) =>
export const webViewerID = (id) => `${id}/view`;
export const webPreviewerID = (id) => `${id}/preview`;
export const copyDocs = (
copyComments = true,
includeResolvedCommentsOnCopy = true,
copyCollaborators = false,
) =>
`${id}/copy?${new URLSearchParams({
// formats: pdf, doc, txt, html, odt, epub
const downloadDocs = (id, format) =>
// formats: pdf, pptx
const downloadSlides = (id, format) =>
const downloadSlidesPage = (id, page) =>
// formats: pdf, xlsx, csv
const downloadSheets = (id, format) =>
// formats: pdf, svg, jpg
const downloadDrawings = (id, format) =>
Copy link

LazZiya commented Sep 5, 2023

Any idea how to setup the viewer to switch between files while in full screen mode? same like Gmail attachments.

Copy link

@LazZiya if I understand you correctly, that's the embedded=true& part in[PDF-URL]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment