update docs to reflect api changes
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,3 @@
|
|||||||
.vscode
|
.vscode
|
||||||
main
|
main
|
||||||
pdwebconfig.toml
|
pdwebconf.toml
|
||||||
|
@@ -11,7 +11,7 @@ import (
|
|||||||
var vi *viper.Viper
|
var vi *viper.Viper
|
||||||
|
|
||||||
var defaultConfig = `# Pixeldrain Web UI server configuration
|
var defaultConfig = `# Pixeldrain Web UI server configuration
|
||||||
api_url_external = "/api" # Used in the web browser, can be a relative path
|
api_url_external = "https://sia.pixeldrain.com/api" # Used in the web browser, should be a full URL. Not ending with a slash
|
||||||
api_url_internal = "http://127.0.0.1:8080/api" # Used for internal API requests to the pixeldrain server, not visible to users
|
api_url_internal = "http://127.0.0.1:8080/api" # Used for internal API requests to the pixeldrain server, not visible to users
|
||||||
static_resource_dir = "res/static"
|
static_resource_dir = "res/static"
|
||||||
template_dir = "res/template"
|
template_dir = "res/template"
|
||||||
|
@@ -43,7 +43,20 @@
|
|||||||
resource <strong>do</strong> require an API key.
|
resource <strong>do</strong> require an API key.
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
Though API keys have not been implemented yet.
|
Though API keys have not been implemented yet, so you can't use
|
||||||
|
those methods yet.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Some JSON responses include fields which end in "_href" (some
|
||||||
|
people don't know this, but "href" stands for "Hypertext
|
||||||
|
Reference", the more you know). These point to different places
|
||||||
|
in the API, which you can retrieve with a GET request. The path
|
||||||
|
is to be appended to the API URL, so "/file/someid/thumbnail"
|
||||||
|
becomes "{{apiUrl}}/file/someid/thumbnail".
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
The base URL for the API is "{{apiUrl}}", all paths below are
|
||||||
|
relative to that URL.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2>File Methods</h2>
|
<h2>File Methods</h2>
|
||||||
|
@@ -26,17 +26,10 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>name</td>
|
<td>name</td>
|
||||||
<td>false</td>
|
<td>false</td>
|
||||||
<td>300 Characters</td>
|
<td>255 Characters</td>
|
||||||
<td>Name of file param</td>
|
<td>Multipart file name</td>
|
||||||
<td>Name of the file to upload</td>
|
<td>Name of the file to upload</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>description</td>
|
|
||||||
<td>false</td>
|
|
||||||
<td>5000 Characters</td>
|
|
||||||
<td>Pixeldrain File</td>
|
|
||||||
<td>Description of the file</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h3>Returns</h3>
|
<h3>Returns</h3>
|
||||||
@@ -73,13 +66,7 @@
|
|||||||
{
|
{
|
||||||
"success": false,
|
"success": false,
|
||||||
"value": "name_too_long",
|
"value": "name_too_long",
|
||||||
"message": "File Name is too long, Max 300 characters allowed."
|
"message": "File Name is too long, Max 255 characters allowed."
|
||||||
}</pre>
|
|
||||||
<pre>HTTP 413: Payload Too Large
|
|
||||||
{
|
|
||||||
"success": false,
|
|
||||||
"value": "description_too_long",
|
|
||||||
"message": "File Description is too long, Max 5000 characters allowed."
|
|
||||||
}</pre>
|
}</pre>
|
||||||
</div>
|
</div>
|
||||||
</details>
|
</details>
|
||||||
|
@@ -15,8 +15,6 @@
|
|||||||
<link rel="icon" sizes="180x180" href="res/img/pixeldrain.png"/>
|
<link rel="icon" sizes="180x180" href="res/img/pixeldrain.png"/>
|
||||||
<link rel="icon" sizes="256x256" href="res/img/pixeldrain_big.png"/>
|
<link rel="icon" sizes="256x256" href="res/img/pixeldrain_big.png"/>
|
||||||
|
|
||||||
<style th:include="fragments :: background-pattern" th:inline="text"></style>
|
|
||||||
|
|
||||||
<script src="/res/script/jquery-2.1.4.min.js"></script>
|
<script src="/res/script/jquery-2.1.4.min.js"></script>
|
||||||
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css"/>
|
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css"/>
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
|
||||||
|
@@ -10,9 +10,9 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"fornaxian.com/pixeldrain-api/log"
|
|
||||||
"fornaxian.com/pixeldrain-web/conf"
|
"fornaxian.com/pixeldrain-web/conf"
|
||||||
"fornaxian.com/pixeldrain-web/pixelapi"
|
"fornaxian.com/pixeldrain-web/pixelapi"
|
||||||
|
"github.com/Fornaxian/log"
|
||||||
|
|
||||||
"github.com/julienschmidt/httprouter"
|
"github.com/julienschmidt/httprouter"
|
||||||
"github.com/timakin/gonvert"
|
"github.com/timakin/gonvert"
|
||||||
|
Reference in New Issue
Block a user