Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 

Uploadcare client for Erlang

Usage

Auth_data = [{public_key, "your_pub_key"}, {private_key, "your_priv_key"}].
  • Start uploadcare app (following examples are equal):
uploadcare:start(Auth_data).
uploadcare:start(),
uploadcare:set_auth_data(Auth_data).
application:start(uploadcare),
uploadcare:set_auth_data(Auth_data).
  • Use the library to upload, store, get or delete files from/to Uploadcare.com
UUID = "some-uuid-that-you've-got-from-post-data-for-example",
File_data = uploadcare:info(UUID), %% Just get a JSON data for the file
File_data2 = uploadcare:store(UUID), %% Store the file
File_data3 = uploadcare:delete(UUID). %% Delete the file
  • File uploading could be implemented in 2 steps:
%% Send upload request and get token
Token = uploadcare:upload_url("http://learnyousomeerlang.com/static/img/erlang-the-movie.png"),
%% And check upload status for the token
Status = uploadcare:upload_status(Token), %% Result is a JSON where UUID of uploaded file could be found

About

Uploadcare.com API client for Erlang

Resources

Releases

No releases published

Packages

No packages published

Languages