Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
revert
Browse files
src/routes/api/generate/+server.ts
CHANGED
@@ -80,10 +80,6 @@ export async function POST({ request, cookies } : RequestEvent) {
|
|
80 |
const file_name_formatted = randomUUID() + "_" + generation?.inputs?.replaceAll(/[^a-zA-Z0-9]/g, "-") + ".png"
|
81 |
await promises.writeFile(`${publicEnv.PUBLIC_FILE_UPLOAD_DIR}/${file_name_formatted}`, response)
|
82 |
|
83 |
-
const dir2 = await promises.opendir("./static/data").catch(() => null)
|
84 |
-
if (!dir2) await promises.mkdir("./static/data")
|
85 |
-
await promises.symlink("/data/uploads", "./static/data/uploads")
|
86 |
-
|
87 |
gallery = await prisma.gallery.create({
|
88 |
data: {
|
89 |
image: file_name_formatted,
|
|
|
80 |
const file_name_formatted = randomUUID() + "_" + generation?.inputs?.replaceAll(/[^a-zA-Z0-9]/g, "-") + ".png"
|
81 |
await promises.writeFile(`${publicEnv.PUBLIC_FILE_UPLOAD_DIR}/${file_name_formatted}`, response)
|
82 |
|
|
|
|
|
|
|
|
|
83 |
gallery = await prisma.gallery.create({
|
84 |
data: {
|
85 |
image: file_name_formatted,
|