# Class UploadOptions (5.0.3)

    public final class UploadOptions

Allows users to customize the behavior of a single upload to the
[BlobstoreService](https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.blobstore.jakarta.BlobstoreService).

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> UploadOptions

## Inherited Members

[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Methods

### equals(@Nullable Object object)

    public boolean equals(@Nullable Object object)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `object` | `https://docs.oracle.com/javase/8/docs/api/java/lang/@org/jspecify/annotations/Nullable Object.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

**Overrides** [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-)

### getGoogleStorageBucketName()

    public String getGoogleStorageBucketName()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | the storage bucket name. |

### getMaxUploadSizeBytes()

    public long getMaxUploadSizeBytes()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | the maximum upload size. |

### getMaxUploadSizeBytesPerBlob()

    public long getMaxUploadSizeBytesPerBlob()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | the maximum upload size per blob. |

### googleStorageBucketName(String bucketName)

    public UploadOptions googleStorageBucketName(String bucketName)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `bucketName` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.blobstore.UploadOptions` |   |

### hasGoogleStorageBucketName()

    public boolean hasGoogleStorageBucketName()

Determines if the storage bucket is set.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### hasMaxUploadSizeBytes()

    public boolean hasMaxUploadSizeBytes()

Determines if the maximum size is set.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### hasMaxUploadSizeBytesPerBlob()

    public boolean hasMaxUploadSizeBytesPerBlob()

Determines if the maximum upload size per blob is set.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### hashCode()

    public int hashCode()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

**Overrides** [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--)

### maxUploadSizeBytes(long maxUploadSizeBytes)

    public UploadOptions maxUploadSizeBytes(long maxUploadSizeBytes)

Sets the maximum size in bytes that for the total upload. If the upload
exceeds this value then a 413 error will be returned to the client.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `maxUploadSizeBytes` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The maximum size in bytes for the upload. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.blobstore.UploadOptions` | `this` (for chaining) |

### maxUploadSizeBytesPerBlob(long maxUploadSizeBytesPerBlob)

    public UploadOptions maxUploadSizeBytesPerBlob(long maxUploadSizeBytesPerBlob)

Sets the maximum size in bytes for any one blob in the upload. If any blob
in the upload exceeds this value then a 413 error will be returned to the
client.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `maxUploadSizeBytesPerBlob` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The maximum size in bytes that any one blob in the upload can be. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.blobstore.UploadOptions` | `this` (for chaining) |

### toString()

    public String toString()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

**Overrides** [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--)