diff --git a/src/api/filesAPI.ts b/src/api/filesAPI.ts index 5e991f7..5d46bd1 100644 --- a/src/api/filesAPI.ts +++ b/src/api/filesAPI.ts @@ -92,10 +92,15 @@ export const getFileThumbnailAPI = async (thumbnailID: string) => { export const getFileFullThumbnailAPI = async (fileID: string) => { const url = `http://localhost:5173/api/file-service/full-thumbnail/${fileID}`; + const response = await axios.get(url, { responseType: "arraybuffer", }); - return response.data; + + const imgFile = new Blob([response.data]); + const imgUrl = URL.createObjectURL(imgFile); + + return imgUrl; }; export const getVideoTokenAPI = async () => { diff --git a/src/components/AddNewDropdown/index.tsx b/src/components/AddNewDropdown/index.tsx index 32f5b6a..ef22293 100644 --- a/src/components/AddNewDropdown/index.tsx +++ b/src/components/AddNewDropdown/index.tsx @@ -56,24 +56,24 @@ const AddNewDropdown: React.FC = (props) => { multiple={true} onChange={handleUpload} /> -