1.3.1 • Published 2 years ago

@zapscloud/zapsstorage v1.3.1

Weekly downloads
2
License
MIT
Repository
github
Last release
2 years ago

zapsstorage

Zapscloud Storage API Client

Initialize Library with config values

var zapsstorage = new ZapsStorage({
    app: 'appname',
    authkey: ' ',
    authsecret: ' '
})

Snippet for File Upload

Upload a file with public access url

var imagesfolder = 'students/images'

zapsstorage.uploadFile(imagesfolder, '/data/images/merchant_shop.png', true)
.then(function (response) {
    console.log('Upload Response', response)
})
.catch(function (err) {
    console.log('Error Upload', err)
});

Snippet for Get File Details

Get File Details by Uploaded File

zapsstorage.getFileDetail(imagesfolder+'merchant_shop.png')
.then(function (response) {
    console.log('Response File Details', response)
})
.catch(function (err) {
    console.log('Error Insert', err)
});

Snippet for Get File List

Get File Details by Uploaded File

zapsstorage.getFileList(imagesfolder)
.then(function (response) {
    console.log('Response File & Folder List', response)
})
.catch(function (err) {
    console.log('Error Insert', err)
});

Snippet for File Download

Download a file in given folder

zapsstorage.getFile(imagesfolder+'merchant_shop.png','/download/images')
.then(function (response) {
    console.log('Download Response', response)
})
.catch(function (err) {
    console.log('Error Download', err)
});

Snippet for Remove Uploaded File

Remove uploaded file using file id

zapsstorage.removeFile(imagesfolder+'merchant_shop.png')
.then(function (response) {
    console.log('Response Remove File', response)
})
.catch(function (err) {
    console.log('Error Remove File', err)
});
1.3.1

2 years ago

1.3.0

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago