Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StorageService

Hierarchy

  • StorageService

Index

Constructors

constructor

Methods

base64Parser

  • base64Parser(base64Value: string): { base64Body: string; mimeType: string; size: number }
  • Parameters

    • base64Value: string

    Returns { base64Body: string; mimeType: string; size: number }

    • base64Body: string
    • mimeType: string
    • size: number

buildFileUrl

  • buildFileUrl(id: string): any

createFileFromBase64Body

  • createFileFromBase64Body(parentFolder: Folder, fileName: string, mimeType: string, base64Body: string): File

createFolderByYearAndMonth

  • createFolderByYearAndMonth(parentFolder?: GoogleAppsScript.Drive.Folder): Folder

generateFileName

  • generateFileName(fileName: string, rename?: RenamePolicy): string

getFileById

  • getFileById(id: string, authEmail?: undefined | string): File

getFileInfo

getFileInfoById

  • getFileInfoById(id: string, authEmail?: undefined | string): FileInfo

getFilesInfo

  • getFilesInfo(files: File[]): FileInfo[]

getOrCreateFolderByName

  • getOrCreateFolderByName(name: string, parentFolder?: GoogleAppsScript.Drive.Folder): Folder

getSharingPreset

getUploadFolder

  • getUploadFolder(): Folder

hasEditPermission

  • hasEditPermission(authEmail: string, file: File): boolean

hasViewPermission

  • hasViewPermission(file: File, authEmail?: undefined | string): boolean

isFileInsideUploadFolder

  • isFileInsideUploadFolder(file: File): boolean

isFileShared

  • isFileShared(file: File): boolean

isValidFileSize

  • isValidFileSize(sizeBytes: number): boolean

isValidFileType

  • isValidFileType(mimeType: string): boolean

removeFile

  • removeFile(authEmail: string, id: string): File

setEditPermissionForUser

  • setEditPermissionForUser(authEmail: string, file: File): File

setFileSharing

  • setFileSharing(file: File, sharing?: FileSharing): File

updateFile

  • updateFile(authEmail: string, id: string, data?: FileUpdateData): File

uploadFile

uploadFiles

  • uploadFiles(uploadResources: UploadResource[], authEmail?: undefined | string): File[]

Generated using TypeDoc