Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
llm-train
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wuhao
llm-train
Commits
3411cec9
Commit
3411cec9
authored
Apr 01, 2024
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asder
parent
95825589
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
upload.js
src/pages/api/upload.js
+4
-2
No files found.
src/pages/api/upload.js
View file @
3411cec9
...
@@ -6,9 +6,11 @@ import formidable from "formidable";
...
@@ -6,9 +6,11 @@ import formidable from "formidable";
export
default
async
function
handler
(
req
,
res
)
{
export
default
async
function
handler
(
req
,
res
)
{
if
(
req
.
method
===
"POST"
)
{
if
(
req
.
method
===
"POST"
)
{
const
form
=
formidable
({});
const
formData
=
await
req
.
formData
();
// Get the file from the form data
const
file
=
formData
.
get
(
"file"
);
console
.
log
(
"===================================="
);
console
.
log
(
"===================================="
);
console
.
log
(
f
orm
);
console
.
log
(
f
ile
);
console
.
log
(
"===================================="
);
console
.
log
(
"===================================="
);
res
.
status
(
200
).
json
({
data
:
"sad"
});
res
.
status
(
200
).
json
({
data
:
"sad"
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment