improved thumbnail loading

This commit is contained in:
subnub
2024-12-30 04:57:56 -05:00
parent e65ac93edb
commit 33a83d14df
10 changed files with 61 additions and 123 deletions
-26
View File
@@ -79,32 +79,6 @@ export const downloadFileAPI = async (fileID: string) => {
link.click();
};
export const getFileThumbnailAPI = async (thumbnailID: string) => {
const url = `${getBackendURL()}/file-service/thumbnail/${thumbnailID}`;
const response = await axios.get(url, {
responseType: "arraybuffer",
});
const imgFile = new Blob([response.data]);
const imgUrl = URL.createObjectURL(imgFile);
return imgUrl;
};
export const getFileFullThumbnailAPI = async (fileID: string) => {
const url = `${getBackendURL()}/file-service/full-thumbnail/${fileID}`;
const response = await axios.get(url, {
responseType: "arraybuffer",
});
const imgFile = new Blob([response.data]);
const imgUrl = URL.createObjectURL(imgFile);
return imgUrl;
};
export const getVideoTokenAPI = async () => {
const response = await axios.get(
"/file-service/download/access-token-stream-video"