All Products
Search
Document Center

Object Storage Service:Upload files (Java SDK V1)

Last Updated:Nov 25, 2025

This topic describes the methods for uploading objects using the Object Storage Service (OSS) software development kit (SDK) for Java.

In Object Storage Service (OSS), the basic unit of data is an object. The OSS SDK for Java provides the following methods for uploading objects:

  • Simple upload (Java SDK V1): You can upload a single object of up to 5 GB by calling the PutObject method. This includes streaming uploads and file uploads.

  • Form upload (Java SDK V1): You can upload an object of up to 5 GB to a specified bucket using an HTML form.

  • Append upload (Java SDK V1): You can append content to an existing appendable object of up to 5 GB by calling the AppendObject method.

  • Resumable upload (Java SDK V1): You can specify a checkpoint. If a network error or program crash interrupts the upload, the upload resumes from the checkpoint. This method supports concurrent uploads and custom part sizes. Resumable upload is recommended for large objects up to 48.8 TB.

  • Multipart upload: You can split a large object into multiple parts and upload the parts separately. Multipart upload is recommended for large objects up to 48.8 TB.

  • Upload using a signed URL (Java SDK V1): You can generate a signed URL with the OSS SDK for Java to allow other users to upload objects.

During an upload, you can set object metadata and view the upload progress using the progress bar (Java SDK V1). After the upload is complete, you can also perform an upload callback (Java SDK V1).