You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+80-2Lines changed: 80 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -146,10 +146,88 @@ node_storage_manager allows you to switch between clients easily without reconfi
146
146
console.log(`file downloaded`);
147
147
}
148
148
```
149
+
### Integration Samples
150
+
## API Documentation
149
151
152
+
### StorageInstance functions
153
+
154
+
This contains a reference to the storage-pipe module. It is a valid use case to use
155
+
both this module and all it's functions
156
+
157
+
### StorageInstance.download()
158
+
Download file from S3, AWS & NFS using sotrage pipe
159
+
160
+
`parameters`:
161
+
162
+
*`bucketName` - required, S3 bucket name to download files from.
163
+
*`filename` - required, file to download from bucket
164
+
*`destination` - required, where to put the file when done downloading
165
+
166
+
### StorageInstance.upload()
167
+
Uploads file to S3, AWS & NFS using sotrage pipe
168
+
169
+
`parameters`:
170
+
*`bucketName` - required, S3 bucket name to upload files to.
171
+
*`filename` - required, file to up to bucket
172
+
*`destination` - optional, for renaming file during upload i.e if file bob.jpg is beign uploaded setting `destination` on upload method will use `destination` value to rename the file
173
+
174
+
`parameters required if on CLOUDINARY Instance`:
175
+
*`bucketName` - required, S3 bucket name to upload files to.
176
+
*`filename` - required, file to up to bucket
177
+
*`fileType` - required, Type of file to upload e.g image, video
178
+
179
+
180
+
### StorageInstance.createBucket()
181
+
Create's Bucket in S3, AWS & NFS using sotrage pipe
182
+
183
+
`parameters required if on S3 Instance`:
184
+
*`bucketName` - required, Bucketname to Create.
185
+
*`ACL` - required, Define which AWS accounts or groups are granted access and the type of access. e.g public-read
186
+
187
+
`parameters required if on GCLOUD Instance`:
188
+
*`bucketName` - required, Bucketname to Create.
189
+
*`location` - required, Define specific region e.g ASIA
190
+
*`storageClass` - optinal, e.g coldline default storage or Leave the second argument blank for default settings.
191
+
192
+
`parameters required if on NFS Instance`:
193
+
*`bucketName` - required, Bucketname to Create.
194
+
195
+
196
+
### StorageInstance.deleteBucket()
197
+
Delete Bucket in S3, AWS & NFS using sotrage pipe
198
+
199
+
`parameters required`:
200
+
*`bucketName` - required, Bucketname to Delete.
201
+
202
+
203
+
### StorageInstance.listBuckets()
204
+
List Buckets in S3, AWS & NFS using sotrage pipe
205
+
206
+
`parameters required`:
207
+
*`None` - No parameters Required
208
+
209
+
210
+
### StorageInstance.listFiles()
211
+
List files in Bucket on S3, AWS & NFS using sotrage pipe
212
+
213
+
`parameters required`:
214
+
*`bucketName` - required, Bucketname to List files from.
215
+
216
+
217
+
### StorageInstance.deleteFile()
218
+
Delete file in Bucket on S3, AWS & NFS using sotrage pipe
219
+
220
+
`parameters required`:
221
+
*`bucketName` - required, Bucketname to delete file from.
222
+
*`filename` - required, Filen to delete
223
+
224
+
225
+
### StorageInstance.getBucketMetadata()
226
+
Get metadata from GCLOUD Storage `Note these is only applicable to GCLOUD instance alone`
227
+
228
+
`parameters required`:
229
+
*`bucketName` - required, Bucketname to fetch it's metadata
0 commit comments