Skip to content

Conversation

srivastavarahull
Copy link
Contributor

No description provided.

tylerwarner33 and others added 5 commits August 26, 2025 06:33
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…-Upload

Add xAdsMeta properties To OSS Object Upload Methods
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds XadsMeta properties to the Upload function to support metadata configuration during object uploads. The changes enable users to specify content type, content disposition, content encoding, cache control, and custom metadata when uploading objects to OSS.

  • Added five new optional parameters for XadsMeta properties to the Upload methods
  • Updated both Stream and file path upload methods with consistent parameter support
  • Added corresponding environment variable setup in the test class

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.

File Description
oss/test/TestOss.cs Added environment variables for XadsMeta properties and updated test method calls
oss/source/custom-code/OssClient.cs Added XadsMeta parameters to both UploadObjectAsync method overloads with documentation
oss/source/custom-code/OSSFileTransfer.cs Updated Upload method signature to include XadsMeta parameters
oss/source/custom-code/IOSSFileTransfer.cs Updated interface definition to include XadsMeta parameters

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

accessToken = await this.AuthenticationProvider.GetAccessToken();
}
var response = await this.oSSFileTransfer.Upload(bucketKey, objectKey, sourceToUpload, accessToken, cancellationToken, requestIdPrefix, progress);
var response = await this.oSSFileTransfer.Upload(bucketKey, objectKey, sourceToUpload, accessToken, cancellationToken, requestIdPrefix, progress, xAdsMetaContentType,xAdsMetaContentDisposition, xAdsMetaContentEncoding, xAdsMetaCacheControl, xAdsUserDefinedMetadata);
Copy link
Preview

Copilot AI Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after comma between xAdsMetaContentType and xAdsMetaContentDisposition parameters. This should be consistent with the spacing used for other parameters.

Suggested change
var response = await this.oSSFileTransfer.Upload(bucketKey, objectKey, sourceToUpload, accessToken, cancellationToken, requestIdPrefix, progress, xAdsMetaContentType,xAdsMetaContentDisposition, xAdsMetaContentEncoding, xAdsMetaCacheControl, xAdsUserDefinedMetadata);
var response = await this.oSSFileTransfer.Upload(bucketKey, objectKey, sourceToUpload, accessToken, cancellationToken, requestIdPrefix, progress, xAdsMetaContentType, xAdsMetaContentDisposition, xAdsMetaContentEncoding, xAdsMetaCacheControl, xAdsUserDefinedMetadata);

Copilot uses AI. Check for mistakes.

/// (optional)
/// </param>
/// <param name="xAdsMetaContentType">
///The Content-Type value for the uploaded object to record within OSS. (optional)
Copy link
Preview

Copilot AI Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XML documentation comments are missing proper spacing. Each comment should start with '/// ' (three slashes followed by a space) instead of '///'.

Copilot uses AI. Check for mistakes.

///The Content-Type value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaContentDisposition">
///The Content-Disposition value for the uploaded object to record within OSS. (optional)
Copy link
Preview

Copilot AI Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XML documentation comments are missing proper spacing. Each comment should start with '/// ' (three slashes followed by a space) instead of '///'.

Copilot uses AI. Check for mistakes.

Comment on lines +84 to +96
///The Content-Type value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaContentDisposition">
///The Content-Disposition value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaContentEncoding">
///The Content-Encoding value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaCacheControl">
///The Cache-Control value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsUserDefinedMetadata">
///Custom metadata to be stored with the object, which can be retrieved later on download or when retrieving object details. Must be a JSON object that is less than 100 bytes. (optional)
Copy link
Preview

Copilot AI Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XML documentation comments are missing proper spacing. Each comment should start with '/// ' (three slashes followed by a space) instead of '///'.

Suggested change
///The Content-Type value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaContentDisposition">
///The Content-Disposition value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaContentEncoding">
///The Content-Encoding value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaCacheControl">
///The Cache-Control value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsUserDefinedMetadata">
///Custom metadata to be stored with the object, which can be retrieved later on download or when retrieving object details. Must be a JSON object that is less than 100 bytes. (optional)
/// The Content-Type value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaContentDisposition">
/// The Content-Disposition value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaContentEncoding">
/// The Content-Encoding value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaCacheControl">
/// The Cache-Control value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsUserDefinedMetadata">
/// Custom metadata to be stored with the object, which can be retrieved later on download or when retrieving object details. Must be a JSON object that is less than 100 bytes. (optional)

Copilot uses AI. Check for mistakes.

///The Content-Encoding value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaCacheControl">
///The Cache-Control value for the uploaded object to record within OSS. (optional)
Copy link
Preview

Copilot AI Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XML documentation comments are missing proper spacing. Each comment should start with '/// ' (three slashes followed by a space) instead of '///'.

Suggested change
///The Cache-Control value for the uploaded object to record within OSS. (optional)
/// The Cache-Control value for the uploaded object to record within OSS. (optional)

Copilot uses AI. Check for mistakes.

/// (optional)
/// </param>
/// <param name="xAdsMetaContentType">
///The Content-Type value for the uploaded object to record within OSS. (optional)
Copy link
Preview

Copilot AI Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XML documentation comments are missing proper spacing. Each comment should start with '/// ' (three slashes followed by a space) instead of '///'.

Suggested change
///The Content-Type value for the uploaded object to record within OSS. (optional)
/// The Content-Type value for the uploaded object to record within OSS. (optional)

Copilot uses AI. Check for mistakes.

Comment on lines +147 to +159
///The Content-Type value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaContentDisposition">
///The Content-Disposition value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaContentEncoding">
///The Content-Encoding value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaCacheControl">
///The Cache-Control value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsUserDefinedMetadata">
///Custom metadata to be stored with the object, which can be retrieved later on download or when retrieving object details. Must be a JSON object that is less than 100 bytes. (optional)
Copy link
Preview

Copilot AI Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XML documentation comments are missing proper spacing. Each comment should start with '/// ' (three slashes followed by a space) instead of '///'.

Suggested change
///The Content-Type value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaContentDisposition">
///The Content-Disposition value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaContentEncoding">
///The Content-Encoding value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaCacheControl">
///The Cache-Control value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsUserDefinedMetadata">
///Custom metadata to be stored with the object, which can be retrieved later on download or when retrieving object details. Must be a JSON object that is less than 100 bytes. (optional)
/// The Content-Type value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaContentDisposition">
/// The Content-Disposition value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaContentEncoding">
/// The Content-Encoding value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaCacheControl">
/// The Cache-Control value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsUserDefinedMetadata">
/// Custom metadata to be stored with the object, which can be retrieved later on download or when retrieving object details. Must be a JSON object that is less than 100 bytes. (optional)

Copilot uses AI. Check for mistakes.

Comment on lines +147 to +159
///The Content-Type value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaContentDisposition">
///The Content-Disposition value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaContentEncoding">
///The Content-Encoding value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaCacheControl">
///The Cache-Control value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsUserDefinedMetadata">
///Custom metadata to be stored with the object, which can be retrieved later on download or when retrieving object details. Must be a JSON object that is less than 100 bytes. (optional)
Copy link
Preview

Copilot AI Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XML documentation comments are missing proper spacing. Each comment should start with '/// ' (three slashes followed by a space) instead of '///'.

Suggested change
///The Content-Type value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaContentDisposition">
///The Content-Disposition value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaContentEncoding">
///The Content-Encoding value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaCacheControl">
///The Cache-Control value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsUserDefinedMetadata">
///Custom metadata to be stored with the object, which can be retrieved later on download or when retrieving object details. Must be a JSON object that is less than 100 bytes. (optional)
/// The Content-Type value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaContentDisposition">
/// The Content-Disposition value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaContentEncoding">
/// The Content-Encoding value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaCacheControl">
/// The Cache-Control value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsUserDefinedMetadata">
/// Custom metadata to be stored with the object, which can be retrieved later on download or when retrieving object details. Must be a JSON object that is less than 100 bytes. (optional)

Copilot uses AI. Check for mistakes.

///The Content-Encoding value for the uploaded object to record within OSS. (optional)
/// </param>
/// <param name="xAdsMetaCacheControl">
///The Cache-Control value for the uploaded object to record within OSS. (optional)
Copy link
Preview

Copilot AI Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XML documentation comments are missing proper spacing. Each comment should start with '/// ' (three slashes followed by a space) instead of '///'.

Suggested change
///The Cache-Control value for the uploaded object to record within OSS. (optional)
/// The Cache-Control value for the uploaded object to record within OSS. (optional)

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants