Skip to content
Snippets Groups Projects
Verified Commit 132de538 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Correctly use file ending everywhere

parent 67329809
Branches
Tags
No related merge requests found
...@@ -64,8 +64,8 @@ element.addEventListener("change", () => { ...@@ -64,8 +64,8 @@ element.addEventListener("change", () => {
postData("/upload/", data).then((json) => { postData("/upload/", data).then((json) => {
image_container.classList.remove("uploading"); image_container.classList.remove("uploading");
if (json.success) { if (json.success) {
image_link.href = "/" + json.id; image_link.href = "/" + json.id + ".png";
image.src = "/" + json.id; image.src = "/" + json.id + ".png";
} else { } else {
const image_error = document.createElement("div"); const image_error = document.createElement("div");
image_error.classList.add("alert", "error"); image_error.classList.add("alert", "error");
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
{{else}} {{else}}
<h2 class="title">{{.Image.Title}}</h2> <h2 class="title">{{.Image.Title}}</h2>
{{end}} {{end}}
<a class="image" href="/{{.Image.Id}}"> <a class="image" href="/{{.Image.Id}}.png">
<img src="/{{.Image.Id}}.png"> <img src="/{{.Image.Id}}.png">
</a> </a>
{{if .IsMine}} {{if .IsMine}}
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<div class="url"> <div class="url">
<p>Direct Link</p> <p>Direct Link</p>
<div> <div>
<input id="url_direct" type="text" value="https://i.k8r.eu/{{.Image.Id}}"> <input id="url_direct" type="text" value="https://i.k8r.eu/{{.Image.Id}}.png">
<button class="copy" data-target="#url_direct">Copy</button> <button class="copy" data-target="#url_direct">Copy</button>
</div> </div>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment