Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
travel
Commits
2b374f4d
Commit
2b374f4d
authored
Aug 15, 2022
by
Lee Soobeom
Browse files
edit
parent
f21493ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
frontend/src/post/editpost.tsx
View file @
2b374f4d
...
@@ -54,9 +54,9 @@ export function EditPost() {
...
@@ -54,9 +54,9 @@ export function EditPost() {
for
(
var
i
=
0
;
i
<
filelist
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
filelist
.
length
;
i
++
)
{
formdata
.
append
(
"
picture
"
,
filelist
?.[
i
]);
formdata
.
append
(
"
picture
"
,
filelist
?.[
i
]);
}
}
console
.
log
(
"
one file update before
"
);
//
console.log("one file update before");
const
res
=
await
postApi
.
updateImgAndPost
(
user
.
_id
,
formdata
);
const
res
=
await
postApi
.
updateImgAndPost
(
user
.
_id
,
formdata
);
console
.
log
(
"
one file update
"
,
res
);
//
console.log("one file update", res);
return
res
;
return
res
;
}
}
};
};
...
@@ -72,7 +72,7 @@ export function EditPost() {
...
@@ -72,7 +72,7 @@ export function EditPost() {
const
updateRes
=
await
updateImg2Db
(
file
);
const
updateRes
=
await
updateImg2Db
(
file
);
// console.log("find newfilename", updateRes);
// console.log("find newfilename", updateRes);
navigate
(
navigate
(
{
pathname
:
`/post/
${
post
.
_id
}
`
},
{
pathname
:
`/post
s
/
${
post
.
_id
}
`
},
{
replace
:
true
,
state
:
updateRes
}
{
replace
:
true
,
state
:
updateRes
}
);
);
...
...
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