Skip to content

chvanikoff/uploadcare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages