SyphtClient v0.1.0 SyphtClient.Upload View Source
Uploads files to Sypht.
Configuration
Override these defaults in the :sypht_client section of your config.exs files.
upload_url: "https://api.sypht.com/fileupload"- URL of file upload end pointupload_field_sets: ["sypht.generic"]- Sypht field set(s) to invoke (see https://docs.sypht.com/#section/Introduction)upload_retry_on: [500]- Retry uploads on server HTTP statusupload_initial_backoff: 200- Initial backoff millisecondsupload_retry_until: 60_000- Continue backing off and retrying until this many milliseconds have elapsedupload_http_options: [ssl: [{:versions, [:"tlsv1.2"]}]]- Hackney HTTP options for uploadsupload_error_prefix: "SyphtUpload failed:"- Prefix upload error messages with this
Link to this section Summary
Functions
Uploads the file at path to Sypht using access_token. Returns {:ok, file_id} if successful, {:error, reason_string} otherwise.
Link to this section Functions
Uploads the file at path to Sypht using access_token. Returns {:ok, file_id} if successful, {:error, reason_string} otherwise.