final update
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user