# `ExOss.StorageTask`
[🔗](https://github.com/choice-form/ex_oss/blob/main/lib/ex_oss/storage_task.ex#L1)

Storage task struct for file transfer operations.

## Location Types

  * `{:cloud, bucket, res_key}` - Cloud storage
  * `{:remote, url}` - Remote URL
  * `{:file, path}` - Local file
  * `{:content, binary}` - Raw content

## Examples

    # Upload from URL
    %StorageTask{source: {:remote, url}, target: {:cloud, bucket, key}}

    # Delete
    %StorageTask{source: {:cloud, bucket, key}, target: nil}

    # Delete after N days
    %StorageTask{source: {:cloud, bucket, key}, target: nil, opts: [days: 7]}

# `object`

```elixir
@type object() ::
  {:cloud, bucket :: binary(), res_key :: binary()}
  | {:remote, url :: binary()}
  | {:file, path :: binary()}
  | {:content, content :: binary()}
```

# `t`

```elixir
@type t() :: %ExOss.StorageTask{
  opts: keyword(),
  policy: term(),
  source: object(),
  target: object() | nil
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
