Class MediaResource
The "media" collection of methods.
Inherited Members
Namespace: Google.Apis.ChromePolicy.v1
Assembly: Google.Apis.ChromePolicy.v1.dll
Syntax
public class MediaResource
Constructors
MediaResource(IClientService)
Constructs a new resource.
Declaration
public MediaResource(IClientService service)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service |
Methods
Upload(GoogleChromePolicyVersionsV1UploadPolicyFileRequest, string)
Creates an enterprise file from the content provided by user. Returns a public download url for end user.
Declaration
public virtual MediaResource.UploadRequest Upload(GoogleChromePolicyVersionsV1UploadPolicyFileRequest body, string customer)
Parameters
| Type | Name | Description |
|---|---|---|
| GoogleChromePolicyVersionsV1UploadPolicyFileRequest | body | The body of the request. |
| string | customer | Required. The customer for which the file upload will apply. |
Returns
| Type | Description |
|---|---|
| MediaResource.UploadRequest |
Upload(GoogleChromePolicyVersionsV1UploadPolicyFileRequest, string, Stream, string)
Creates an enterprise file from the content provided by user. Returns a public download url for end user.
Declaration
public virtual MediaResource.UploadMediaUpload Upload(GoogleChromePolicyVersionsV1UploadPolicyFileRequest body, string customer, Stream stream, string contentType)
Parameters
| Type | Name | Description |
|---|---|---|
| GoogleChromePolicyVersionsV1UploadPolicyFileRequest | body | The body of the request. |
| string | customer | Required. The customer for which the file upload will apply. |
| Stream | stream | The stream to upload. See remarks for further information. |
| string | contentType | The content type of the stream to upload. |
Returns
| Type | Description |
|---|---|
| MediaResource.UploadMediaUpload |
Remarks
Considerations regarding stream:
-
If
streamis seekable, then the stream position will be reset to0before reading commences. Ifstreamis not seekable, then it will be read from its current position -
Caller is responsible for maintaining the
streamopen until the upload is completed - Caller is responsible for closing the
stream