GoogleDriveTemporaryContentLease
OfficeIMO.GoogleWorkspace.Drive
Tracks a publicly readable Drive file and its explicit cleanup result.
Inheritance
- object
- GoogleDriveTemporaryContentLease
Remarks
The file has no automatic expiry or disposal lifecycle and remains public until GoogleDriveTemporaryContentLease.CleanupAsync deletes it successfully.
Usage
Explore 1 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 1
Methods
public async Task<GoogleDriveCleanupReport> CleanupAsync(CancellationToken cancellationToken = default) #Attempts to delete the temporary file and returns the persistent cleanup result.
Parameters
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<GoogleDriveCleanupReport>public static async Task<GoogleDriveTemporaryContentLease> CreatePublicReadLeaseAsync(GoogleDriveClient client, byte[] content, GoogleDriveUploadOptions options, TranslationReport? report = null, CancellationToken cancellationToken = default) #Uploads content, grants a non-discoverable public-reader permission, and returns an object for explicit cleanup.
Parameters
- client OfficeIMO.GoogleWorkspace.Drive.GoogleDriveClient
- content byte[]
- options OfficeIMO.GoogleWorkspace.Drive.GoogleDriveUploadOptions
- report OfficeIMO.GoogleWorkspace.TranslationReport? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<GoogleDriveTemporaryContentLease>Inherited Methods
Properties
public GoogleDriveFile File { get; } #Gets metadata for the temporary Drive file.
public string PublicUri { get; } #Gets the public download URI exposed until explicit cleanup deletes the file successfully.
public GoogleDriveCleanupReport CleanupReport { get; } #Gets the cleanup report associated with this lease.