first commit

This commit is contained in:
lihansani
2026-07-13 15:37:05 +08:00
commit 8b11aa2efc
299 changed files with 206339 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
from ninja import Router
from ninja import Router, UploadedFile, File
import os
from fuadmin import settings
router = Router()
# @router.get("/uploadFile")
# def upload_file(request, files: list[UploadedFile] = File(...)):
# file_list = []
# upload_dir = os.path.join(settings.BASE_DIR, 'upload')
# os.makedirs(upload_dir, exist_ok=True)
# for file in files:
# new_path = os.path.join(upload_dir, file.name)
# with open(new_path, 'wb+') as destination:
# for chunk in file.chunks():
# destination.write(chunk)
# file_list.append({
# 'name': file.name,
# 'path': new_path,
# 'size': file.size
# })
# return file_list