An open API service indexing awesome lists of open source software.

https://github.com/gabriel-logan/temp-files

This application is useful for quickly sharing files without creating an account. It provides a simple web interface and an API for uploading, listing, downloading, and deleting files. And all files are protected with a password of your choice and stored in a secure group generated by a UUID v4.
https://github.com/gabriel-logan/temp-files

nextjs nextjs-16 send send-file send-files temporary typescript

Last synced: about 2 months ago
JSON representation

This application is useful for quickly sharing files without creating an account. It provides a simple web interface and an API for uploading, listing, downloading, and deleting files. And all files are protected with a password of your choice and stored in a secure group generated by a UUID v4.

Awesome Lists containing this project

README

          

# API Usage Documentation via CURL

## Locales

- [English](README.md)
- [PortuguΓͺs (Brasil)](README_PT.md)

Base URL:

```
https://temp-files-lake.vercel.app
```

You can access the base URL in your browser to interact with the web interface.

This documentation explains how to use the entire API **via cURL**, with examples for **Linux/MacOS** and **Windows (PowerShell)**.

---

# πŸ“ Upload Files

**Endpoint:** `POST /api/files`

Uploads files via multipart/form-data.

### Required fields

- `password` β€” password needed for all future operations
- `files` β€” one or more files

---

## Linux / MacOS

```
curl -X POST \
-F "password=mypassword" \
-F "files=@/path/file1.png" \
-F "files=@/path/file2.pdf" \
https://temp-files-lake.vercel.app/api/files
```

---

## Windows (PowerShell)

```
curl -X POST `
-F "password=mypassword" `
-F "files=@C:/path/file1.png" `
-F "files=@C:/path/file2.pdf" `
https://temp-files-lake.vercel.app/api/files
```

---

# πŸ“„ List Files in a Group

**Endpoint:** `POST /api/files/get-files`

Returns metadata about files in the group (does not download files).

### JSON body

```json
{
"groupId": "",
"password": ""
}
```

---

## Linux / MacOS

```
curl -X POST \
-H "Content-Type: application/json" \
-d '{"groupId":"YOUR_GROUP_ID","password":"mypassword"}' \
https://temp-files-lake.vercel.app/api/files/get-files
```

---

## Windows (PowerShell)

```
curl -X POST `
-H "Content-Type: application/json" `
-d '{"groupId":"YOUR_GROUP_ID","password":"mypassword"}' `
https://temp-files-lake.vercel.app/api/files/get-files
```

---

# πŸ“₯ Download a Specific File

**Endpoint:** `POST /api/file`

Returns the binary file.

### JSON body

```json
{
"groupId": "",
"fileId": "",
"password": ""
}
```

---

## Linux / MacOS

```
curl -X POST \
-H "Content-Type: application/json" \
-d '{"groupId":"YOUR_GROUP_ID","fileId":"YOUR_FILE_ID","password":"mypassword"}' \
https://temp-files-lake.vercel.app/api/file \
--output downloaded_file.ext
```

---

## Windows (PowerShell)

```
curl -X POST `
-H "Content-Type: application/json" `
-d '{"groupId":"YOUR_GROUP_ID","fileId":"YOUR_FILE_ID","password":"mypassword"}' `
https://temp-files-lake.vercel.app/api/file `
--output downloaded_file.ext
```

---

# πŸ—‘οΈ Delete a Specific File

**Endpoint:** `DELETE /api/file`

### JSON body

```json
{
"groupId": "",
"fileId": "",
"password": ""
}
```

---

## Linux / MacOS

```
curl -X DELETE \
-H "Content-Type: application/json" \
-d '{"groupId":"YOUR_GROUP_ID","fileId":"YOUR_FILE_ID","password":"mypassword"}' \
https://temp-files-lake.vercel.app/api/file
```

---

## Windows (PowerShell)

```
curl -X DELETE `
-H "Content-Type: application/json" `
-d '{"groupId":"YOUR_GROUP_ID","fileId":"YOUR_FILE_ID","password":"mypassword"}' `
https://temp-files-lake.vercel.app/api/file
```

---

# πŸ—ƒοΈ Delete Entire File Group

**Endpoint:** `DELETE /api/files`

### JSON body

```json
{
"groupId": "",
"password": ""
}
```

---

## Linux / MacOS

```
curl -X DELETE \
-H "Content-Type: application/json" \
-d '{"groupId":"YOUR_GROUP_ID","password":"mypassword"}' \
https://temp-files-lake.vercel.app/api/files
```

---

## Windows (PowerShell)

```
curl -X DELETE `
-H "Content-Type: application/json" `
-d '{"groupId":"YOUR_GROUP_ID","password":"mypassword"}' `
https://temp-files-lake.vercel.app/api/files
```

---

# βœ… Route Summary

| Action | Method | Route |
| ------------- | ------ | ---------------------- |
| Upload files | POST | `/api/files` |
| List files | POST | `/api/files/get-files` |
| Download file | POST | `/api/file` |
| Delete file | DELETE | `/api/file` |
| Delete group | DELETE | `/api/files` |