Core library and tests to integrate with an attache server; to be leveraged by client libraries e.g. attache_rails which integrates with ActiveRecord
Test suite will interact with a server when ATTACHE_URL is explicitly set. This can conveniently check if a server at a given URL is attache-compatible. To run such compatibility check, execute the test suite with ATTACHE_URL and ATTACHE_SECRET_KEY set to the correct values
ATTACHE_URL=http://localhost:9292 ATTACHE_SECRET_KEY=topsecret rake
NOTE: the test suite will upload a small jpg file and delete it immediately, for several iterations.
Important variables:
ATTACHE_URLurl pointing to the attache server instance, defaulthttp://localhost:9292ATTACHE_SECRET_KEYoptional shared secret with attache server, default no secret
Optional variables:
ATTACHE_UPLOAD_DURATIONbrowser upload signature expiration duration, default 3 hours; used in conjunction withATTACHE_SECRET_KEYATTACHE_UPLOAD_URL,ATTACHE_DOWNLOAD_URL,ATTACHE_DELETE_URLspecific urls pointing to upload, download, delete API end points, default{ATTACHE_URL}/upload,{ATTACHE_URL}/view,{ATTACHE_URL}/deleteATTACHE_DISCARD_FAILURE_RAISE_ERRORwhen set, raises an error if deleting of files causes an error. by default, deletion errors are discarded
MIT