Skip to content

Commit 219f3fb

Browse files
authored
feat: add api to retrive files from .cache (#7)
- add api to request files from cache - remove start command required to start server, simply executing the file will work - gmail: bundle files from gmail thread into zip - fix relative path detection for providers
2 parents 61fd37f + 9a3d5f3 commit 219f3fb

File tree

10 files changed

+672
-105
lines changed

10 files changed

+672
-105
lines changed

README.md

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,19 @@ The installation can be done manually on Linux, MacOS, Android (Requires Termux)
1818

1919
- First, download the proper executable for your platform from the [Releases page](https://github.com/gamemaker1/dabbu-server/releases). (Caution: releases may not work on certain versions of Android, depending on the manafacturer and version.)
2020

21-
- Open terminal/command prompt and run the following command:
21+
- On Windows, simply double click on the file to run it.
2222

23-
```sh
24-
$ /path/to/executable start
25-
```
26-
27-
If I have downloaded the executable to my downloads folder, the command would be:
28-
29-
- On Windows:
30-
31-
```bat
32-
$ C:\Users\<user name>\Downloads\dabbu-server-win.exe start
33-
```
34-
23+
- On Linux/MacOS, run the following command in a terminal (assuming you have downloaded the executable to your Downloads folder):
3524
- On MacOS:
36-
25+
3726
```sh
38-
$ ~/Downloads/dabbu-server-macos start
27+
$ ~/Downloads/dabbu-server-macos
3928
```
40-
29+
4130
- On Linux:
42-
31+
4332
```sh
44-
$ ~/Downloads/dabbu-server-linux start
33+
$ ~/Downloads/dabbu-server-linux
4534
```
4635

4736
- Your server is now running! To check, go to http://localhost:8080/. You will see the text `Dabbu Server running on port 8080` on the page. If not, try running the server again or check if you have missed a step. If the problem persists, post a message on [Github discussions](https://github.com/gamemaker1/dabbu-server/discussions/categories/q-a) asking for help. We'll only be glad to help you :)

docs/APIs.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Please URL encode all params, especially file and folder paths while sending req
8686
- `fileName`: Name of the file - `string`
8787
- Request body: [Posted as multipart form data]
8888
- The request body may contain any fields that the provider requires to execute the request
89-
- `content`: The file content - `file-data` [Compulsory]
89+
- `content`: The file content - `file-data` [Optional]
9090
- `name`: The name of the file - `string` [Optional]
9191
- `path`: The path to the folder in which the file resides - `string` [Optional]
9292
- `createdAtTime`: Time the file was created (may not be supported by all providers) - `timestamp` [Optional]
@@ -112,3 +112,15 @@ Please URL encode all params, especially file and folder paths while sending req
112112
- `404`: The file was not found - `notFound`
113113
- `500`: Internal server error, used if an uncaught exception appears - `internalServerError`
114114
- `503`: Provider not available - `providerNotFound`
115+
116+
### **Download a file from cache**
117+
#### **GET**: `/cache/:filePath`
118+
- Request parameters: [Compulsory]
119+
- `filePath`: Path to the file - `string`
120+
- Request body: [Empty]
121+
- Response:
122+
- `res`: Download of the file's contents
123+
- Errors:
124+
- `400`: The file path was incorrect - `malformedUrl`
125+
- `404`: The file was not found - `notFound`
126+
- `500`: Internal server error, used if an uncaught exception appears - `internalServerError`

0 commit comments

Comments
 (0)