We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8db03c7 commit df026d8Copy full SHA for df026d8
src/routes/api/Media/[requestedUsername]/[requestedMedia]/+server.ts
@@ -88,10 +88,14 @@ export async function GET(event) {
88
} else {
89
buffer = await readFile(filePath);
90
}
91
+ if (buffer == null) {
92
+ error(503, {
93
+ message: "Wait for this image!"
94
+ });
95
+ }
96
return new Response(buffer, {
97
headers: {
98
'Content-Type': 'image/' + requestedFiletype, // or other appropriate content type
- 'empty': (filePath == null) ? 'y' : 'n'
99
100
});
101
} catch (imageError) {
0 commit comments