Compare commits

..

No commits in common. "076e19b435c1b9614cc104023d4bc1618c6f10f5" and "4f4f7fb5c1ed21747b4b3bea5771674cf8d159a5" have entirely different histories.

View File

@ -24,22 +24,20 @@ export const DecryptZip = () => {
const fileUrl = searchParams.get('file')
if (fileUrl) {
const decodedFileUrl = decodeURIComponent(fileUrl)
setIsLoading(true)
setLoadingSpinnerDesc('Fetching zip file')
axios
.get(decodedFileUrl, {
.get(fileUrl, {
responseType: 'arraybuffer'
})
.then((res) => {
const fileName = decodedFileUrl.split('/').pop()
const fileName = fileUrl.split('/').pop()
const file = new File([res.data], fileName!)
setSelectedFile(file)
})
.catch((err) => {
console.error(
`error occurred in getting zip file from ${decodedFileUrl}`,
`error occurred in getting zip file from ${fileUrl}`,
err
)
})
@ -49,10 +47,7 @@ export const DecryptZip = () => {
}
const key = searchParams.get('key')
if (key) {
const decodedKey = decodeURIComponent(key)
setEncryptionKey(decodedKey)
}
if (key) setEncryptionKey(key)
}, [searchParams])
const handleDecrypt = async () => {