Skip to content

Commit

Permalink
[#26] fix: upload api config(request header) fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
hanbin9775 committed Aug 15, 2021
1 parent bed3215 commit 941549b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/api/upload/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import customAxios from 'lib/axios';
import { uploadDto } from './upload.dto';

const upload = async (dto: uploadDto) => {
const data = await customAxios.post('/videos', dto);
const data = await customAxios.post('/videos', dto, {
headers: {
'Content-Type': 'multipart/form-data',
},
});

return data;
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/Upload/SecondContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const SecondContent = () => {
const selectButton = (value: React.SetStateAction<number>) => {
setUploadObj({
...uploadObj,
category: GAME_CATEGORY[selectedButton - 1],
category: 'lol',
});
setSelectedButton(value);
console.log(uploadObj);
Expand Down

0 comments on commit 941549b

Please sign in to comment.