final update

This commit is contained in:
bagus-arie05
2025-11-11 14:23:30 +07:00
parent 1733c67b9e
commit 783f143902
9 changed files with 202 additions and 137 deletions

View File

@@ -2,8 +2,8 @@ import fs from 'fs'
import path from 'path'
import { lookup } from 'mime-types'
import { createError, setHeader, sendStream } from 'h3'
const FOLDER_PATH = '\\\\10.10.150.129\\Shared'
const config = useRuntimeConfig()
const FOLDER_PATH = config.public.folder_path;
export default defineEventHandler(async (event) => {
const rawName = event.context.params?.name as string | undefined

View File

@@ -5,9 +5,11 @@ import { promisify } from "util"
const readdir = promisify(fs.readdir)
const stat = promisify(fs.stat)
const config = useRuntimeConfig()
// Lokasi folder network share (pastikan sudah di-mount / accessible dari server)
const FOLDER_PATH = "\\\\10.10.150.129\\Shared"
// const FOLDER_PATH = "\\\\10.10.123.49\\qris"
const FOLDER_PATH = config.public.folder_path;
export default defineEventHandler(async (event) => {
try {