Skip to content

Commit a29596a

Browse files
committed
fix: url returning spaces (i deadass forgot to commit)
1 parent 1d83bb5 commit a29596a

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sharex-server",
3-
"version": "2.4.4",
3+
"version": "2.4.5",
44
"description": "ShareX image and file hosting using Node.js",
55
"main": "dist/index.js",
66
"scripts": {

src/index.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,11 @@ export class ShareXServer {
178178
this.#debug(
179179
`File ${req.file.filename} uploaded successfully by ${req.ip}`
180180
);
181-
const url = `
182-
${this.forceHttps ? "https" : req.protocol}://${req.host}
183-
${this.baseUrl}
184-
${req.file?.filename}
185-
`;
186-
return res.json({ url });
181+
return res.json({
182+
url: `${this.forceHttps ? "https" : req.protocol}://${req.host}${
183+
this.baseUrl
184+
}${req.file?.filename}`,
185+
});
187186
}
188187

189188
async #ensureSavePath() {

0 commit comments

Comments
 (0)