mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-05-02 06:26:16 -04:00
fix display of empty files #663
This commit is contained in:
parent
e35a26c916
commit
0673c1cde1
3 changed files with 4 additions and 3 deletions
|
@ -2763,7 +2763,8 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
|||
// extract mediaType
|
||||
const mediaType = attachmentData.substring(5, mediaTypeEnd);
|
||||
// extract data and convert to binary
|
||||
const decodedData = atob(attachmentData.substring(base64Start));
|
||||
const rawData = attachmentData.substring(base64Start);
|
||||
const decodedData = rawData.length > 0 ? atob(rawData) : '';
|
||||
|
||||
// Transform into a Blob
|
||||
const buf = new Uint8Array(decodedData.length);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue