enzostvs HF staff commited on
Commit
5bdd754
·
1 Parent(s): 72a25a8

update sh file

Browse files
Files changed (1) hide show
  1. src/routes/api/generate/+server.ts +1 -1
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(`${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: {
 
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(`./static${publicEnv.PUBLIC_FILE_UPLOAD_DIR}/${file_name_formatted}`, `${publicEnv.PUBLIC_FILE_UPLOAD_DIR}/${file_name_formatted}`, "file")
86
 
87
  gallery = await prisma.gallery.create({
88
  data: {