{"_id":"loopback-storage-service","_rev":"165-004926e53678e761de9b318269b538cf","name":"loopback-storage-service","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"loopback-storage-service","version":"1.0.0","license":{"url":"https://github.com/strongloop/loopback-strorage-service/blob/master/LICENSE","name":"Dual Artistic-2.0/StrongLoop"},"_id":"loopback-storage-service@1.0.0","maintainers":[{"name":"rfeng","email":"enjoyjava@gmail.com"}],"homepage":"https://github.com/strongloop/loopback-storage-service","bugs":{"url":"https://github.com/strongloop/loopback-storage-service/issues"},"dist":{"shasum":"95c9275d2f6d2ff9a2b22c465b7829f584663787","tarball":"https://registry.npmjs.org/loopback-storage-service/-/loopback-storage-service-1.0.0.tgz","integrity":"sha512-1PEJhnRVSxhZpIvQc8AXuOcA/PN+jYVT+DmMI/a8iIDXZ71G335S20lwtTbI6J234Pmjlqxaf85nDjMVS8HOVA==","signatures":[{"sig":"MEUCIQD19+3s+k7fyEnekOrM38dnd1vF0B8AyjmUX4Ez8C0wLAIgFScH0b+gKSkXQCCeIOS/ub+rkodHK9Bgc4KgOzwoo5c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","scripts":{"test":"mocha --timeout 30000 test/*test.js"},"_npmUser":{"name":"rfeng","email":"enjoyjava@gmail.com"},"repository":{"url":"https://github.com/strongloop/loopback-storage-service.git","type":"git"},"_npmVersion":"1.4.3","description":"Loopback Storage Service","directories":{},"dependencies":{"async":"~0.2.10","pkgcloud":"~0.9.4"},"devDependencies":{"mocha":"~1.18.2","mkdirp":"~0.3.5","express":"~3.4.0","loopback":"1.x.x","supertest":"~0.10.0","formidable":"~1.0.14"}},"1.0.2":{"name":"loopback-storage-service","version":"1.0.2","license":{"url":"https://github.com/strongloop/loopback-strorage-service/blob/master/LICENSE","name":"Dual Artistic-2.0/StrongLoop"},"_id":"loopback-storage-service@1.0.2","maintainers":[{"name":"rfeng","email":"enjoyjava@gmail.com"},{"name":"ritch","email":"skawful@gmail.com"},{"name":"strongloop","email":"callback@strongloop.com"},{"name":"bajtos","email":"miro.bajtos@gmail.com"}],"homepage":"https://github.com/strongloop/loopback-storage-service","bugs":{"url":"https://github.com/strongloop/loopback-storage-service/issues"},"dist":{"shasum":"0649b47889b616fb0997f14044ec4697eda77f6d","tarball":"https://registry.npmjs.org/loopback-storage-service/-/loopback-storage-service-1.0.2.tgz","integrity":"sha512-JhPBLywhkzQYOcj+W/laosGGjfOIUfI2DHA3zrieVvE+ofeKxs6Eg90RkFraC9qMTfdDVZg3pbW2T+v07TlUuw==","signatures":[{"sig":"MEUCIQCBzpe5yiWRnFxdsCy2s9ayoRjOetJrkMuFRkva1WU22gIgMVL+TVhYjy/m6HVgkrDXHap5zcnmEC4VvdE39bnPLFA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","scripts":{"test":"mocha --timeout 30000 test/*test.js"},"_npmUser":{"name":"bajtos","email":"miro.bajtos@gmail.com"},"repository":{"url":"https://github.com/strongloop/loopback-storage-service.git","type":"git"},"_npmVersion":"1.4.3","description":"Loopback Storage Service","directories":{},"dependencies":{"async":"~0.2.10","pkgcloud":"~0.9.4","formidable":"~1.0.14"},"devDependencies":{"mocha":"~1.18.2","mkdirp":"~0.3.5","express":"~3.4.0","loopback":"1.x.x","supertest":"~0.10.0"}},"1.0.3":{"name":"loopback-storage-service","version":"1.0.3","license":{"url":"https://github.com/strongloop/loopback-strorage-service/blob/master/LICENSE","name":"Dual Artistic-2.0/StrongLoop"},"_id":"loopback-storage-service@1.0.3","maintainers":[{"name":"rfeng","email":"enjoyjava@gmail.com"},{"name":"ritch","email":"skawful@gmail.com"},{"name":"strongloop","email":"callback@strongloop.com"},{"name":"bajtos","email":"miro.bajtos@gmail.com"}],"homepage":"https://github.com/strongloop/loopback-storage-service","bugs":{"url":"https://github.com/strongloop/loopback-storage-service/issues"},"dist":{"shasum":"7d5dd61699dda3da2e54f2e1572a61c1d693782a","tarball":"https://registry.npmjs.org/loopback-storage-service/-/loopback-storage-service-1.0.3.tgz","integrity":"sha512-9Bh9Gf8SuEaI3pNY778PYg57ax+g4V4AzST4G8GnihKo7rYCD9zqkI6wImj3FIOTSl9s/lVoy9hOuRAij/fihA==","signatures":[{"sig":"MEYCIQCjWKWgWKnQiA/V5JF+WV98Rj3cFV2EV+6QVBtTsaTXiwIhAMLgoA33LXWj43I08Nd1QJzYSmdJ2+FlWMBbGZKkEfFb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"7d5dd61699dda3da2e54f2e1572a61c1d693782a","scripts":{"test":"mocha --timeout 30000 test/*test.js"},"_npmUser":{"name":"rfeng","email":"enjoyjava@gmail.com"},"repository":{"url":"https://github.com/strongloop/loopback-storage-service.git","type":"git"},"_npmVersion":"1.4.9","description":"Loopback Storage Service","directories":{},"dependencies":{"async":"~0.9.0","pkgcloud":"~0.9.6","formidable":"~1.0.14"},"devDependencies":{"mocha":"~1.18.2","mkdirp":"~0.5.0","express":"~3.4.0","loopback":"1.x.x","supertest":"~0.13.0"}},"1.0.4":{"name":"loopback-storage-service","version":"1.0.4","license":{"url":"https://github.com/strongloop/loopback-strorage-service/blob/master/LICENSE","name":"Dual Artistic-2.0/StrongLoop"},"_id":"loopback-storage-service@1.0.4","maintainers":[{"name":"rfeng","email":"enjoyjava@gmail.com"},{"name":"ritch","email":"skawful@gmail.com"},{"name":"strongloop","email":"callback@strongloop.com"},{"name":"bajtos","email":"miro.bajtos@gmail.com"}],"homepage":"https://github.com/strongloop/loopback-storage-service","bugs":{"url":"https://github.com/strongloop/loopback-storage-service/issues"},"dist":{"shasum":"b585dc745a56d5700e0a0ba38f683b17b6a39a18","tarball":"https://registry.npmjs.org/loopback-storage-service/-/loopback-storage-service-1.0.4.tgz","integrity":"sha512-PragBohaBjwFeWNUl6N+qp1gBIs6eHnZ8Pn9vT/cHtr+EN8kdW7tLA6i2eYLgbR++NViDm/9ktXcvRdflMhROQ==","signatures":[{"sig":"MEYCIQC2Ye3mmT5Zt64SiC47/cH/ScakgxpPy0D+C4C6snBzjAIhAL5QuQt01IRKrXx+KMAzP/IRdExLLHkz72yQDx/bCCvA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"b585dc745a56d5700e0a0ba38f683b17b6a39a18","scripts":{"test":"mocha --timeout 30000 test/*test.js"},"_npmUser":{"name":"rfeng","email":"enjoyjava@gmail.com"},"repository":{"url":"https://github.com/strongloop/loopback-storage-service.git","type":"git"},"_npmVersion":"1.4.9","description":"Loopback Storage Service","directories":{},"dependencies":{"async":"~0.9.0","pkgcloud":"~0.9.6","formidable":"~1.0.14"},"devDependencies":{"mocha":"~1.18.2","mkdirp":"~0.5.0","express":"~3.4.0","loopback":"1.x.x","supertest":"~0.13.0"}}},"time":{"created":"2014-04-04T20:36:29.397Z","modified":"2024-07-09T12:43:27.733Z","1.0.0":"2014-04-04T20:36:29.397Z","1.0.2":"2014-05-30T16:38:52.906Z","1.0.3":"2014-06-16T16:05:25.647Z","1.0.4":"2014-06-27T06:53:49.521Z"},"bugs":{"url":"https://github.com/strongloop/loopback-storage-service/issues"},"license":{"url":"https://github.com/strongloop/loopback-strorage-service/blob/master/LICENSE","name":"Dual Artistic-2.0/StrongLoop"},"homepage":"https://github.com/strongloop/loopback-storage-service","repository":{"url":"https://github.com/strongloop/loopback-storage-service.git","type":"git"},"description":"Loopback Storage Service","maintainers":[{"email":"enjoyjava@gmail.com","name":"rfeng"},{"email":"r.m.graham@gmail.com","name":"rmg"},{"email":"dianahmlau@gmail.com","name":"dhmlau"},{"email":"jgorzinski@gmail.com","name":"theprez"},{"email":"oss@bajtos.net","name":"bajtos"},{"email":"skawful@gmail.com","name":"ritch"}],"readme":"# loopback-storage-service\n\nLoopBack storage service provides Node.js and REST APIs to manage binary contents\nusing pluggable storage providers, such as local file systems, Amazon S3, or\nRackspace cloud files. We use [pkgcloud](https://github.com/pkgcloud/pkgcloud) to support the cloud based\nstorage services including:\n\n- Amazon\n- Rackspace\n- Openstack\n- Azure\n\nThe binary artifacts are organized with containers and files. A container is the\ncollection of files. Each file will belong to a container.\n\n## Define a model with the loopback-storage-service connector\n\nLoopBack exposes the APIs using a model that is attached to a data source configured\nwith the loopback-storage-service connector.\n\n    var ds = loopback.createDataSource({\n        connector: require('loopback-storage-service'),\n        provider: 'filesystem',\n        root: path.join(__dirname, 'storage')\n    });\n\n    var container = ds.createModel('container');\n\nThe following methods are mixed into the model class:\n\n- getContainers(cb): List all containers\n- createContainer(options, cb): Create a new container\n- destroyContainer(container, cb): Destroy an existing container\n- getContainer(container, cb): Look up a container by name\n\n- uploadStream(container, file, options, cb): Get the stream for uploading\n- downloadStream(container, file, options, cb): Get the stream for downloading\n\n- getFiles(container, download, cb): List all files within the given container\n- getFile(container, file, cb): Look up a file by name within the given container\n- removeFile(container, file, cb): Remove a file by name  within the given container\n\n- upload(req, res, cb): Handle the file upload at the server side\n- download(container, file, res, cb): Handle the file download at the server side\n\n## Configure the storage providers\n\nEach storage provider takes different settings; these details about each specific\nprovider can be found below:\n\n* Local File System\n\n\n    {\n        provider: 'filesystem',\n        root: '/tmp/storage'\n    }\n\n* Amazon\n\n\n    {\n        provider: 'amazon',\n        key: '...',\n        keyId: '...'\n    }\n\n* Rackspace\n\n\n    {\n        provider: 'rackspace',\n        username: '...',\n        apiKey: '...'\n    }\n\n* OpenStack\n\n\n    {\n        provider: 'openstack',\n        username: 'your-user-name',\n        password: 'your-password',\n        authUrl: 'https://your-identity-service'\n    }\n\n* Azure\n\n\n    {\n        provider: 'azure',\n        storageAccount: \"test-storage-account\",         // Name of your storage account\n        storageAccessKey: \"test-storage-access-key\" // Access key for storage account\n    }\n\n\n## REST APIs\n\n- GET /api/containers\n\nList all containers\n\n- GET /api/containers/:container\n\nGet information about a container by name\n\n- POST /api/containers\n\nCreate a new container\n\n- DELETE /api/containers/:container\n\nDelete an existing container by name\n\n- GET /api/containers/:container/files\n\nList all files within a given container by name\n\n- GET /api/containers/:container/files/:file\n\nGet information for a file within a given container by name\n\n- DELETE /api/containers/:container/files/:file\n\nDelete a file within a given container by name\n\n- POST /api/containers/:container/upload\n\nUpload one or more files into the given container by name. The request body should\nuse [multipart/form-data](https://www.ietf.org/rfc/rfc2388.txt) which the file input\ntype for HTML uses.\n\n- GET /api/containers/:container/download/:file\n\nDownload a file within a given container by name","readmeFilename":"README.md","users":{"mbouclas":true}}