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