yarn add react-dropzone --save
2 컴포넌트 form 안에 다음과 같이 추가
( )
1)
(components/VideoUploadPage/VideoUploadPage.js)
<Dropzone onDrop multiple maxSize>
{
({getRootProps, getInputProps}) =>(
<div style={{width: '300px', height: '240px', border: '1px solid lightgray', display: 'flex', alignItems: 'center',justifyContent:'center'}} {..getRootProps()}>
<input {...getInputProps()}/>
<Icon type="plus" style={{ fontSize:'3rem'}}/>
</div>
)}
yarn add multer --save in Server directory
비디오 파일을 서버에 저장
저장 경로를 클라이언트로 전달
yarn add fluent-ffmpeg
Axios.post('/api/video/thumnail', variable)
.then (response=>{
if(response.data.success) {
} else {
aleart('썸네일 생성에 실패했습니다.')
})
썸네일 파일 경로 정보 클라이언트로 보내기
썸네일 이미지를 화면에 표시