https://github.com/softmarshmallow/uguu-api
uguu.se nodejs wrapper written in typescript
https://github.com/softmarshmallow/uguu-api
Last synced: 2 months ago
JSON representation
uguu.se nodejs wrapper written in typescript
- Host: GitHub
- URL: https://github.com/softmarshmallow/uguu-api
- Owner: softmarshmallow
- License: mit
- Created: 2020-10-29T02:44:21.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-11-01T10:56:58.000Z (over 4 years ago)
- Last Synced: 2025-01-16T16:21:48.553Z (4 months ago)
- Language: TypeScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# uguu.se api node wrapper
visit [uguu.se](https://uguu.se) for more information.
> uguu.se is not a bridged service. it is a 3rd party service enable you to host files for 24 hours.
## Installation
``` shell
yarn add uguu-api
```## Usage
``` ts
import { upload } from "uguu-api"// Node
upload("myfile.md", "#My file\n>awesome.").then((r)=> {
console.log(r)
})// Browser
upload("myfile.md", new Blob(["#My file\n>awesome."])).then((r)=> {
console.log(r)
})>>> { url: "https://a.uguu.se/edq0g575eEml_file.md", originName: "myfile.md" }
```## curl example
``` shell
curl --request POST \
--url 'https://uguu.se/api.php?d=upload-tool' \
--header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
--form file=
```response: `https://a.uguu.se/HSMrk8wpYdTh_andy.jpeg` as html page