Methods
base64Parser
- base64Parser(base64Value: string): { base64Body: string; mimeType: string; size: number }
-
Parameters
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
-
Parameters
-
parentFolder: Folder
-
fileName: string
-
mimeType: string
-
base64Body: string
Returns File
createFolderByYearAndMonth
- createFolderByYearAndMonth(parentFolder?: GoogleAppsScript.Drive.Folder): Folder
-
Parameters
-
Optional parentFolder: GoogleAppsScript.Drive.Folder
Returns Folder
generateFileName
- generateFileName(fileName: string, rename?: RenamePolicy): string
-
Parameters
Returns string
getFileById
- getFileById(id: string, authEmail?: undefined | string): File
-
Parameters
-
id: string
-
Optional authEmail: undefined | string
Returns File
getFileInfoById
- getFileInfoById(id: string, authEmail?: undefined | string): FileInfo
-
Parameters
-
id: string
-
Optional authEmail: undefined | string
getOrCreateFolderByName
- getOrCreateFolderByName(name: string, parentFolder?: GoogleAppsScript.Drive.Folder): Folder
-
Parameters
-
name: string
-
Optional parentFolder: GoogleAppsScript.Drive.Folder
Returns Folder
getUploadFolder
- getUploadFolder(): Folder
hasEditPermission
- hasEditPermission(authEmail: string, file: File): boolean
-
Parameters
-
authEmail: string
-
file: File
Returns boolean
hasViewPermission
- hasViewPermission(file: File, authEmail?: undefined | string): boolean
-
Parameters
-
file: File
-
Optional authEmail: undefined | string
Returns boolean
isFileInsideUploadFolder
- isFileInsideUploadFolder(file: File): boolean
-
Parameters
Returns boolean
isFileShared
- isFileShared(file: File): boolean
-
Parameters
Returns boolean
isValidFileSize
- isValidFileSize(sizeBytes: number): boolean
-
Parameters
Returns boolean
isValidFileType
- isValidFileType(mimeType: string): boolean
-
Parameters
Returns boolean
removeFile
- removeFile(authEmail: string, id: string): File
-
Parameters
-
authEmail: string
-
id: string
Returns File
setEditPermissionForUser
- setEditPermissionForUser(authEmail: string, file: File): File
-
Parameters
-
authEmail: string
-
file: File
Returns File
setFileSharing
- setFileSharing(file: File, sharing?: FileSharing): File
-
Parameters
-
file: File
-
Default value sharing: FileSharing = "PRIVATE"
Returns File
updateFile
- updateFile(authEmail: string, id: string, data?: FileUpdateData): File
-
Parameters
-
authEmail: string
-
id: string
-
Returns File
uploadFile
-
Parameters
-
-
Optional customFolder: undefined | string
-
-
Default value sharing: FileSharing = "PRIVATE"
-
Optional authEmail: undefined | string
Returns File
uploadFiles
- uploadFiles(uploadResources: UploadResource[], authEmail?: undefined | string): File[]
-
Parameters
-
-
Optional authEmail: undefined | string
Returns File[]