diff --git a/.gitignore b/.gitignore
index f64d2da..135069d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,3 @@
.vscode
main
-pdwebconfig.toml
\ No newline at end of file
+pdwebconf.toml
diff --git a/conf/config.go b/conf/config.go
index 2f7e403..5cf9336 100644
--- a/conf/config.go
+++ b/conf/config.go
@@ -11,7 +11,7 @@ import (
var vi *viper.Viper
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
static_resource_dir = "res/static"
template_dir = "res/template"
diff --git a/res/template/apidoc.html b/res/template/apidoc.html
index 400216f..c6c49f4 100644
--- a/res/template/apidoc.html
+++ b/res/template/apidoc.html
@@ -43,7 +43,20 @@
resource do require an API key.
- Though API keys have not been implemented yet.
+ Though API keys have not been implemented yet, so you can't use
+ those methods yet.
+
+ 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". +
++ The base URL for the API is "{{apiUrl}}", all paths below are + relative to that URL.
HTTP 413: Payload Too Large -{ - "success": false, - "value": "description_too_long", - "message": "File Description is too long, Max 5000 characters allowed." + "message": "File Name is too long, Max 255 characters allowed." }diff --git a/res/template/paste.html b/res/template/paste.html index 596a716..7f31c91 100644 --- a/res/template/paste.html +++ b/res/template/paste.html @@ -15,8 +15,6 @@ - - diff --git a/webcontroller/filePreview.go b/webcontroller/filePreview.go index 5da1689..8bd5067 100644 --- a/webcontroller/filePreview.go +++ b/webcontroller/filePreview.go @@ -10,9 +10,9 @@ import ( "path/filepath" "strings" - "fornaxian.com/pixeldrain-api/log" "fornaxian.com/pixeldrain-web/conf" "fornaxian.com/pixeldrain-web/pixelapi" + "github.com/Fornaxian/log" "github.com/julienschmidt/httprouter" "github.com/timakin/gonvert"