All Products
Search
Document Center

Object Storage Service:Upload files (Java SDK V1)

Last Updated:Jun 03, 2026

Choose the right upload method for your use case — from single-object uploads under 5 GB to resumable and multipart uploads for objects up to 48.8 TB.

The OSS Java SDK stores data as objects. The upload method you choose depends primarily on your object size and whether you need fault tolerance or browser-based uploads.

  • Simple upload (Java SDK V1): Upload a single object using the PutObject method. Supports streaming uploads and file uploads. Best for objects up to 5 GB when you need a straightforward single-request upload.

  • Form upload (Java SDK V1): Upload an object directly from a browser using an HTML form, without routing traffic through your server. Best for client-side uploads where the object size is under 5 GB.

  • Append upload (Java SDK V1): Append content to the end of an existing appendable object using the AppendObject method. Best for streaming log files or any data that grows incrementally. The maximum object size is 5 GB.

  • Resumable upload (Java SDK V1): Upload large objects with automatic recovery from network errors or program crashes. Supports concurrent uploads and custom part sizes. Best for large files in unstable network conditions. The maximum object size is 48.8 TB.

  • Multipart upload (Java SDK V1): Split a large object into parts and upload them in parallel for higher throughput. Best when you need full control over part management and parallel upload logic. The maximum object size is 48.8 TB.

  • Upload using a signed URL (Java SDK V1): Generate a signed URL using the OSS Java SDK so that other users can upload objects directly to OSS without requiring Alibaba Cloud credentials.

During an upload, manage object metadata (Java SDK V1) or track progress with a progress bar (Java SDK V1). After the upload completes, configure an upload callback (Java SDK V1).