Qiniu.Uploader

For uploading.

Summary

upload(put_policy, local_file, opts)

Upload a file directly. See http://developer.qiniu.com/docs/v6/api/reference/up/upload.html

Functions

upload(put_policy, local_file, opts)

Upload a file directly. See http://developer.qiniu.com/docs/v6/api/reference/up/upload.html

Example

put_policy = %Qiniu.PutPolicy{scope: "books", deadline: 1427990400}
Qiniu.Uploader.upload put_policy, "~/cool.jpg", key: "cool.jpg"

Options

  • :key - key name in Qiniu bucket
  • :crc32 - crc32 to check the file
  • others - Custom fields, e.g. foo: "foo", bar: "bar"