Skip to content

Commit 83ad0df

Browse files
authored
Added multi account
1 parent 23ea50a commit 83ad0df

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

README.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ npm install
1616
Modify `config.js` or use environment variables. Example `.env` file:
1717

1818
```
19-
20-
PASS=Katarenai nemurenai toroimerai
19+
MEGA_ACCOUNT=email:pass;email:pass
2120
TEMP=memory
2221
```
2322

@@ -31,16 +30,30 @@ To stop or restart:
3130
```sh
3231
npm stop
3332
npm restart
34-
```
33+
```
3534

36-
## Uploading Files
35+
## **Uploading Files**
3736

3837
Send a `POST` request to `/upload` with a multipart form containing a file.
3938

40-
Example using `curl`:
39+
#### **Single Mode (Default)**
40+
Uploads the file using the default (first) account.
4141
```sh
42-
curl -X POST -F "[email protected]" http://yourdomain.com/upload
43-
```
42+
curl -X POST -F "[email protected]" -F "mode=single" http://yourdomain.com/upload
43+
```
44+
45+
#### **Dual Mode (Specify Account)**
46+
Uploads the file to a specific account by providing an email.
47+
```sh
48+
curl -X POST -F "[email protected]" -F "mode=dual" -F "[email protected]" http://yourdomain.com/upload
49+
```
50+
51+
### **Parameters Explained:**
52+
| Parameter | Description |
53+
|------------|-------------|
54+
| `file` | The file to upload. |
55+
| `mode` | Upload mode: `single` (default) or `dual` (requires `email`). |
56+
| `email` | (Optional) Required if `mode=dual`, specifies which account to use. |
4457

4558
### Response Example
4659
```json
@@ -56,8 +69,8 @@ curl -X POST -F "[email protected]" http://yourdomain.com/upload
5669
```
5770

5871
## To-Do
59-
- [ ] Add multiple accounts support
6072
- [ ] Proper logging (error and alerts)
73+
- [ ] Fix webpage
6174

6275
## Contributing
6376
1. Fork the repository

0 commit comments

Comments
 (0)