Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make FileOptions type #100

Merged
merged 5 commits into from
Jun 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,10 @@ storage_client = create_client(url, headers, is_async=False)

storage_client.list_buckets()
```

### Uploading files
When uploading files, make sure to set the correct mimetype by using the `file_options` argument:
```py
storage_client.from_("bucket").upload("/folder/file.png", file_object, {"content-type": "image/png"})
```
If no mime type is given, the default `text/plain` will be used.
Loading