Skip to content

Commit

Permalink
Add guide-level explanation
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <github@xuanwo.io>
  • Loading branch information
Xuanwo committed Jul 11, 2022
1 parent ec14a5e commit 4140482
Showing 1 changed file with 38 additions and 3 deletions.
41 changes: 38 additions & 3 deletions docs/rfcs/0438-multipart.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,40 @@ OpenDAL users can upload objects larger than 5 GiB via supporting multipart uplo

# Guide-level explanation

TBD
Users can start a multipart upload via:

```rust
let mp = op.object("path/to/file").create_multipart().await?;
```

Or build a multipart via already known upload id:

```rust
let mp = op.object("path/to/file").into_multipart("<upload_id>");
```

With `Multipart`, we can upload a new part:

```rust
let part = mp.write(part_number, content).await?;
```

After all parts has been uploaded, we can finish this upload:

```rust
let _ = mp.complete(parts).await?;
```

Or, we can abort already uploaded parts:

```rust
let _ = mp.abort().await?;
```

# Reference-level explanation

TBD

# Drawbacks

TBD
Expand All @@ -53,8 +82,14 @@ TBD

# Unresolved questions

TBD
None.

# Future possibilities

TBD
## Support list multipart uploads

We can support list multipart uploads to list ongoing multipart uploads. So that we can resume an upload or abort them.

## Support list part

We can support list parts to list already uploaded parts for an upload.

1 comment on commit 4140482

@github-actions

This comment was marked as outdated.

Please sign in to comment.