Compare commits
4 Commits
4f4f7fb5c1
...
076e19b435
Author | SHA1 | Date | |
---|---|---|---|
076e19b435 | |||
a02f6859b8 | |||
|
6e5b6ccc02 | ||
|
e498ecb082 |
@ -24,20 +24,22 @@ export const DecryptZip = () => {
|
||||
const fileUrl = searchParams.get('file')
|
||||
|
||||
if (fileUrl) {
|
||||
const decodedFileUrl = decodeURIComponent(fileUrl)
|
||||
|
||||
setIsLoading(true)
|
||||
setLoadingSpinnerDesc('Fetching zip file')
|
||||
axios
|
||||
.get(fileUrl, {
|
||||
.get(decodedFileUrl, {
|
||||
responseType: 'arraybuffer'
|
||||
})
|
||||
.then((res) => {
|
||||
const fileName = fileUrl.split('/').pop()
|
||||
const fileName = decodedFileUrl.split('/').pop()
|
||||
const file = new File([res.data], fileName!)
|
||||
setSelectedFile(file)
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(
|
||||
`error occurred in getting zip file from ${fileUrl}`,
|
||||
`error occurred in getting zip file from ${decodedFileUrl}`,
|
||||
err
|
||||
)
|
||||
})
|
||||
@ -47,7 +49,10 @@ export const DecryptZip = () => {
|
||||
}
|
||||
|
||||
const key = searchParams.get('key')
|
||||
if (key) setEncryptionKey(key)
|
||||
if (key) {
|
||||
const decodedKey = decodeURIComponent(key)
|
||||
setEncryptionKey(decodedKey)
|
||||
}
|
||||
}, [searchParams])
|
||||
|
||||
const handleDecrypt = async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user