Browse Source

Changed upload to bypass loading of blob if we aren't encrypting client side.

tags/3.0.0
Teknikode 2 years ago
parent
commit
afa4394052
1 changed files with 13 additions and 2 deletions
  1. 13
    2
      Teknik/Areas/Upload/Scripts/Upload.js

+ 13
- 2
Teknik/Areas/Upload/Scripts/Upload.js View File

@@ -181,8 +181,19 @@ function createUpload(fileName) {
function processFile(fileBlob, fileName, contentType, contentSize, fileID) {
// Check the file size
if (contentSize <= maxUploadSize) {
// Encrypt the file and upload it
encryptFile(fileBlob, fileName, contentType, fileID, uploadFile);

var fileExt = getFileExtension(fileName);

// Get session settings
var encrypt = $('#encrypt').is(':checked');

if (encrypt) {
// Encrypt the file and upload it
encryptFile(fileBlob, fileName, contentType, fileID, uploadFile);
} else {
// pass it along
uploadFile(fileBlob, null, null, contentType, fileExt, fileID, encrypt);
}
}
else {
// An error occured

Loading…
Cancel
Save