# dugoly-uploader

> Component for uploading images, linked to a server

Latest version **1.0.1** (published 2021-06-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install dugoly-uploader
pnpm add dugoly-uploader
yarn add dugoly-uploader
bun add dugoly-uploader
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2021-06-16 |
| First published | 2021-04-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 2 |
| Unpacked size | 32.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | omershiran |
| Maintainers | omershiran |

## Links

- npm: https://www.npmjs.com/package/dugoly-uploader
- Repository: https://github.com/omershiran/dugoly-uploader
- Homepage: https://github.com/omershiran/dugoly-uploader#readme
- Issues: https://github.com/omershiran/dugoly-uploader/issues
- npm.io page: https://npm.io/package/dugoly-uploader

## Dependencies (2)

- [react-spinners](https://npm.io/package/react-spinners.md) ^0.10.6
- [@material-ui/core](https://npm.io/package/@material-ui/core.md) ^4.11.3

## Recent versions

- 1.0.1 (latest) — 2021-06-16
- 1.0.0 — 2021-04-23

## README

# dugoly-uploader

> Component for uploading images, linked to a server

for more information go to [dugoly, Developers tools](https://dugoly.com/Documentation/readme/dugoly-uploader.html)


## Install

```bash
npm install --save dugoly-uploader
```

## Usage

```jsx
import React from 'react'
import Login from 'dugoly-login'
import Uploader  from 'dugoly-uploader'


const App = () => {
  const callback=(path)=>{alert(path)}
  const onError=(err)=>{alert("the error is:  "+err)}
  return(<div>
    <Login />
    <br />
     <Uploader callback={callback} onError={onError}/>
  </div>)
  
}

export default App

```

## props
* callback - will contain the callback function to perform after a successful upload, the parameter given to the function is the path to the image on the network

* onError - will contain the function to execute in case of failure to upload, the function accepts the error
Note - in case the user is not logged in, no upload will be made but also this function will not be activated, instead, a message will appear that he must log in


## General instructions for using the component
The component displays an image upload button
Selecting an image will upload the image to the server
Instead of the button, the image will appear
Refreshing the page will cause the button to reappear

Note - the visual presentation of the component will also be displayed without logging in by dugoly but it will not be possible to upload the image
Therefore the user should be allowed to login each time the uploader is used

## Additional libraries
[To view dugoly's list of libraries click here](https://dugoly.com/Documentation/readme/dugoly-Libraries.html)

## License

MIT © omershiran [motto - Application and website development](https://motto.co.il/)

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