1
0
mirror of https://git.teknik.io/Teknikode/Teknik.git synced 2023-08-02 14:16:22 +02:00

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

This commit is contained in:
Uncled1023 2017-07-11 21:17:51 -07:00
parent 55bf97fe53
commit afa4394052

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