Fix: Preview not available for password protected buckets
This commit is contained in:
@@ -135,12 +135,13 @@
|
|||||||
this.passwordWrong = false;
|
this.passwordWrong = false;
|
||||||
this.files = this.files.map(item => {
|
this.files = this.files.map(item => {
|
||||||
if(typeof item === 'object') return item;
|
if(typeof item === 'object') return item;
|
||||||
const d = AES.decrypt(item, this.password);
|
let f = AES.decrypt(item, this.password);
|
||||||
try {
|
try {
|
||||||
return Object.assign(
|
f = JSON.parse(f.toString(encUtf8));
|
||||||
JSON.parse(d.toString(encUtf8)),
|
return Object.assign(f, {
|
||||||
{downloaded: false}
|
downloaded: false,
|
||||||
);
|
previewType: getPreviewType(f, this.config.maxPreviewSize)
|
||||||
|
});
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
this.passwordWrong = true;
|
this.passwordWrong = true;
|
||||||
return item;
|
return item;
|
||||||
|
|||||||
Reference in New Issue
Block a user