# cloud-capture-components

> A set of react components to easily manage images with the cloud capture API. Check out some [live examples here](https://www.cloudcapture.io/docs/components)

Latest version **0.1.2** (published 2021-06-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install cloud-capture-components
pnpm add cloud-capture-components
yarn add cloud-capture-components
bun add cloud-capture-components
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2021-06-07 |
| First published | 2021-06-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 4 |
| Unpacked size | 209.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | warren |
| Maintainers | warrenjday |

## Links

- npm: https://www.npmjs.com/package/cloud-capture-components
- npm.io page: https://npm.io/package/cloud-capture-components

## Dependencies (4)

- [cuid](https://npm.io/package/cuid.md) ^2.1.8
- [xhr-mock](https://npm.io/package/xhr-mock.md) ^2.5.1
- [byte-size](https://npm.io/package/byte-size.md) ^7.0.1
- [styled-components](https://npm.io/package/styled-components.md) ^5.3.0

## Recent versions

- 0.1.2 (latest) — 2021-06-07
- 0.1.1 — 2021-06-07
- 0.1.0 — 2021-06-07

## README

# Cloud Capture Components

A set of react components to easily manage images with the cloud capture API. Check out some [live examples here](https://www.cloudcapture.io/docs/components)

## Installation

Install with npm or yarn

NPM

```
npm i cloud-capture-components
```

Yarn

```
yarn add cloud-capture-components
```

## Signing uploads

Uploads are made directly from the browser to your configured source. To obtain a signed payload for upload you need to call `https://api.cloudcapture.io/{source_name}/upload/sign?apiKey=1234` securely from your own server.

## Upload Form

Use the upload form to easily upload one or many images to your configured source.

### Component

```jsx
<UploadForm
  onRequestUpload={() => {
    // Within your own server call https://api.cloudcapture.io/{source_name}/upload/sign?apiKey=1234
    return fetch('http://localhost:3000/get-signed-payload')
      .then(res => res.json())
      .then(res => res);
  }}
/>
```

### Props

| Prop               | Type                         | Description                  |
| ------------------ | ---------------------------- | ---------------------------- |
| dropText           | string                       | Text to display in dropzone  |
| onRequestUpload \* | () => Promise<UploadPayload> | Request for a signed payload |
| onUploadStart      | () => void                   | Called when upload begins    |
| onUploadEnd        | () => Entries                | Called when upload ends      |

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