Fix upload file issue

This commit is contained in:
2023-07-26 21:00:41 +09:00
parent 74cd9c0df2
commit 930191569f
5 changed files with 6 additions and 12 deletions
+2 -2
View File
@@ -81,10 +81,10 @@ export class UsersService {
}
async getProfilePicture(userId: number, res: any) {
const path = `/data/${userId}.png`;
const path = `/data/${userId}.jpg`;
if (existsSync(path)) {
const file = createReadStream(path);
return new StreamableFile(file);
return file.pipe(res);
}
// We could not find a profile icon locally, using gravatar instead.
const user = await this.user({ id: userId });
+1
View File
@@ -0,0 +1 @@
*
+1 -4
View File
@@ -9,7 +9,7 @@ services:
volumes:
- ./back:/app
- ./assets:/assets
- data:/data
- ./data:/data
depends_on:
db:
condition: service_healthy
@@ -55,6 +55,3 @@ services:
- "back"
env_file:
- .env
volumes:
data:
+1 -4
View File
@@ -10,7 +10,7 @@ services:
- .env
volumes:
- ./assets:/assets
- data:/data
- ./data:/data
scorometer:
image: ghcr.io/chroma-case/scorometer:main
ports:
@@ -44,6 +44,3 @@ services:
- "back"
env_file:
- .env
volumes:
data:
+1 -2
View File
@@ -10,7 +10,7 @@ services:
- .env
volumes:
- ./assets:/assets
- data:/data
- ./data:/data
scorometer:
build: ./scorometer
ports:
@@ -53,4 +53,3 @@ services:
volumes:
db:
data: