Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

GoogleDriveTemporaryContentLease

OfficeIMO.GoogleWorkspace.Drive

Namespace
OfficeIMO.GoogleWorkspace.Drive
Assembly
OfficeIMO.GoogleWorkspace.Drive
Source revision
be6c300e4ab1 with working tree changes
Modifiers
sealed

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.

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 optional
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 required
content byte[] required
options OfficeIMO.GoogleWorkspace.Drive.GoogleDriveUploadOptions required
report OfficeIMO.GoogleWorkspace.TranslationReport? = null optional
cancellationToken System.Threading.CancellationToken = default optional

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.