# digital-ocean-sdk2

> Upload files to digital ocean.

Latest version **0.0.1** (published 2018-12-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install digital-ocean-sdk2
pnpm add digital-ocean-sdk2
yarn add digital-ocean-sdk2
bun add digital-ocean-sdk2
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2018-12-19 |
| First published | 2018-12-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Ajay Kumar Devarakonda |
| Maintainers | edmunddantes |

## Links

- npm: https://www.npmjs.com/package/digital-ocean-sdk2
- npm.io page: https://npm.io/package/digital-ocean-sdk2

## Dependencies (1)

- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.378.0

## Recent versions

- 0.0.1 (latest) — 2018-12-19

## README

# digital-ocean-sdk
Digital-ocean-sdk is a semantic wrapper around aws-sdk with a few added functions.

Anything you cannot find in here can be found at aws-sdk documentation: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html

## API
### params
```javascript
var params = {
	Body: "file data here",
	Bucket: "my-bucket-name",
	Key: "filename",
	FolderName: "folder", // added in our sdk
};
```

### Upload file
Method: `Storage.prototype.uploadFile`
<br/>
Upload a file to storage space.
<br/>
Usage:
<br/> 
```javascript
const uploadedFile = await storage.uploadFile(params);
```

### Storage.prototype.uploadFileToDir
Upload a file to storage space at a certain directory. Do not forget to add `FolderName` property on params if you need it to be in a folder.
Usage: 
```javascript
const uploadedFile = await storage.uploadFileToDir(params);
```

### DO.Storage.prototype.listObjectsAsync
List all the objects, filtered by params. In params `Bucket` is the only required property.
Usage:
```javascript
const allObjects = await storage.listObjectsAsync(params);
```

### Delete a file
Delete a file. `FolderName`, `Bucket` and `Key` are required properties on `params`. 
__Warning__: Adding property `Body` will cause the plugin to throw an error.
<br/>
Usage:
```javascript
await storage.deleteObjectAsync(params);
```

---
_Source: https://npm.io/package/digital-ocean-sdk2 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
