diff --git a/src/Google.Storage.V1/StorageClient.UploadObject.cs b/src/Google.Storage.V1/StorageClient.UploadObject.cs index 8d9aa1d7eb77..5208e7e4b23d 100644 --- a/src/Google.Storage.V1/StorageClient.UploadObject.cs +++ b/src/Google.Storage.V1/StorageClient.UploadObject.cs @@ -29,7 +29,7 @@ public abstract partial class StorageClient /// The name of the bucket containing the object. Must not be null. /// The name of the object within the bucket. Must not be null. /// The content type of the object. This should be a MIME type - /// such as "text/html" or "application/octet-stream". Must not be null, but may be empty. + /// such as "text/html" or "application/octet-stream". May be null. /// The stream to read the data from. Must not be null. /// Additional options for the upload. May be null, in which case appropriate /// defaults will be used. @@ -52,7 +52,7 @@ public abstract partial class StorageClient /// The name of the bucket containing the object. Must not be null. /// The name of the object within the bucket. Must not be null. /// The content type of the object. This should be a MIME type - /// such as "text/html" or "application/octet-stream". Must not be null, but may be empty. + /// such as "text/html" or "application/octet-stream". May be null. /// The stream to read the data from. Must not be null. /// A task representing the asynchronous operation, with a result returning the /// representation of the uploaded object. @@ -67,7 +67,7 @@ public virtual Task UploadObjectAsync(string bucket, string objectName, /// The name of the bucket containing the object. Must not be null. /// The name of the object within the bucket. Must not be null. /// The content type of the object. This should be a MIME type - /// such as "text/html" or "application/octet-stream". Must not be null, but may be empty. + /// such as "text/html" or "application/octet-stream". May be null. /// The stream to read the data from. Must not be null. /// Additional options for the upload. May be null, in which case appropriate /// defaults will be used. diff --git a/src/Google.Storage.V1/StorageClientImpl.UploadObject.cs b/src/Google.Storage.V1/StorageClientImpl.UploadObject.cs index 049f805adfb4..f3ceaa905c5a 100644 --- a/src/Google.Storage.V1/StorageClientImpl.UploadObject.cs +++ b/src/Google.Storage.V1/StorageClientImpl.UploadObject.cs @@ -34,7 +34,6 @@ public sealed partial class StorageClientImpl : StorageClient { ValidateBucket(bucket); Preconditions.CheckNotNull(objectName, nameof(objectName)); - Preconditions.CheckNotNull(contentType, nameof(contentType)); return UploadObject( new Object { Bucket = bucket, Name = objectName, ContentType = contentType }, source, options, progress); @@ -59,7 +58,6 @@ public override Task UploadObjectAsync(string bucket, string objectName, { ValidateBucket(bucket); Preconditions.CheckNotNull(objectName, nameof(objectName)); - Preconditions.CheckNotNull(contentType, nameof(contentType)); return UploadObjectAsync(new Object { Bucket = bucket, Name = objectName, ContentType = contentType }, source, options, cancellationToken, progress); }