Skip to content

Commit

Permalink
upload-page fix
Browse files Browse the repository at this point in the history
  • Loading branch information
777arc committed Apr 29, 2024
1 parent fbf193f commit 6e3c0c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/pages/upload-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export const UploadPage = () => {

// Check if sas token is expired
useEffect(() => {
if (config.data.uploadPageBlobSasUrl) {
if (config.data) {
const expireDateTime = config.data.uploadPageBlobSasUrl.split('&se=')[1].split('&')[0];
if (Date.parse(expireDateTime) - Date.parse(new Date()) < 0) setExpired(true);
}
}, [config.data.uploadPageBlobSasUrl]);
}, [config.data]);

async function uploadBlob(f) {
// Create azure blob client
Expand Down

0 comments on commit 6e3c0c1

Please sign in to comment.