Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
K
kiaisoft_tuananh_nuxt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
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
TTS Tran Viet Anh
kiaisoft_tuananh_nuxt
Commits
b2fb2547
Commit
b2fb2547
authored
Feb 01, 2023
by
Le Dinh Trung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upload post image fixed
parent
d318b797
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
index.vue
pages/posts/index.vue
+9
-9
No files found.
pages/posts/index.vue
View file @
b2fb2547
...
@@ -591,19 +591,19 @@ export default {
...
@@ -591,19 +591,19 @@ export default {
},
},
createPost
()
{
createPost
()
{
const
self
=
this
const
self
=
this
const
fd
=
new
FormData
()
fd
.
append
(
'
title
'
,
this
.
title
)
fd
.
append
(
'
category_id
'
,
this
.
category_id
)
fd
.
append
(
'
content
'
,
this
.
content
)
fd
.
append
(
'
images
'
,
this
.
images
)
fd
.
append
(
'
user_id
'
,
this
.
user_id
)
fd
.
append
(
'
status
'
,
this
.
statu
)
this
.
$axios
this
.
$axios
.
post
(
'
/posts/
'
,
.
post
(
'
/posts/
'
,
{
fd
,
title
:
this
.
title
,
category_id
:
this
.
category_id
,
content
:
this
.
content
,
images
:
this
.
images
,
user_id
:
this
.
user_id
,
status
:
this
.
status
},
{
{
headers
:
{
headers
:
{
'
Content-Type
'
:
'
application/json; multipart/form-data; boundary=---------------------------974767299852498929531610575
'
,
'
Content-Type
'
:
'
multipart/form-data
'
,
Authorization
:
`Bearer
${
this
.
$auth
.
$storage
.
getUniversal
(
'
token
'
)}
`
Authorization
:
`Bearer
${
this
.
$auth
.
$storage
.
getUniversal
(
'
token
'
)}
`
}
}
}
}
...
...
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