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:
parent
55bf97fe53
commit
afa4394052
@ -181,8 +181,19 @@ function createUpload(fileName) {
|
|||||||
function processFile(fileBlob, fileName, contentType, contentSize, fileID) {
|
function processFile(fileBlob, fileName, contentType, contentSize, fileID) {
|
||||||
// Check the file size
|
// Check the file size
|
||||||
if (contentSize <= maxUploadSize) {
|
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 {
|
else {
|
||||||
// An error occured
|
// An error occured
|
||||||
|
Loading…
Reference in New Issue
Block a user