Skip to content

Commit

Permalink
Update README file
Browse files Browse the repository at this point in the history
  • Loading branch information
gabifija committed Jan 18, 2019
1 parent 426ed78 commit 64767a7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,26 @@ Filestack uses multipart uploading by default, which is faster for larger files.
```ruby
filelink = client.upload(filepath: '/path/to/file')

filelink = client.upload(filepath: '/path/to/file', multipart: false)

# OR

filelink = client.upload(external_url: 'http://someurl.com')
```

To upload a local and external file with query parameters:
```ruby
filelink = client.upload(filepath: '/path/to/file', options: {mimetype: 'image/png'})

filelink = client.upload(external_url: 'http://someurl.com/image.png', options: {mimetype: 'image/jpeg'})
```

To store file on `dropbox`, `azure`, `gcs` or `rackspace`, you must have the chosen provider configured in the developer portal to enable this feature. By default the file is stored on `s3`.
```ruby
filelink = client.upload(filepath: '/path/to/file', storage: 'dropbox', options: {path: 'folder_name/'})

filelink = client.upload(external_url: 'http://someurl.com/image.png', storage: 'dropbox', options: {path: 'folder_name/'})
```
### Security
If security is enabled on your account, or if you are using certain actions that require security (delete, overwrite and certain transformations), you will need to create a security object and pass it into the client on instantiation.

Expand Down

0 comments on commit 64767a7

Please sign in to comment.