Spaces:
Running
Running
update sh file
Browse files
src/routes/api/generate/+server.ts
CHANGED
|
@@ -82,7 +82,7 @@ export async function POST({ request, cookies } : RequestEvent) {
|
|
| 82 |
const file_name_formatted = randomUUID() + "_" + generation?.inputs?.replaceAll(/[^a-zA-Z0-9]/g, "-") + ".png"
|
| 83 |
await promises.writeFile(`${publicEnv.PUBLIC_FILE_UPLOAD_DIR}/${file_name_formatted}`, response)
|
| 84 |
// create symlink
|
| 85 |
-
await promises.symlink(
|
| 86 |
|
| 87 |
gallery = await prisma.gallery.create({
|
| 88 |
data: {
|
|
|
|
| 82 |
const file_name_formatted = randomUUID() + "_" + generation?.inputs?.replaceAll(/[^a-zA-Z0-9]/g, "-") + ".png"
|
| 83 |
await promises.writeFile(`${publicEnv.PUBLIC_FILE_UPLOAD_DIR}/${file_name_formatted}`, response)
|
| 84 |
// create symlink
|
| 85 |
+
await promises.symlink(`${publicEnv.PUBLIC_FILE_UPLOAD_DIR}/${file_name_formatted}`, `./static${publicEnv.PUBLIC_FILE_UPLOAD_DIR}/${file_name_formatted}`, "file")
|
| 86 |
|
| 87 |
gallery = await prisma.gallery.create({
|
| 88 |
data: {
|