summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1ff37f5)
This currently applies only for async uploads.
Otherwise we would send the size of the encrypted file and the data of the unencrypted file.
The encrypted file is usually larger than the unencrypted one. So the browser expects more
data and aborts the download because it thinks it didn't receive all the data.
return "Error: referenced file does not exist";
}
return "Error: referenced file does not exist";
}
+ /* Store filesize before encrypting the file */
+ /* Otherwise we would send the size of the encrypted file and the data of the unencrypted file */
+ /* This would break some browsers */
+ $size = filesize($p);
+
$crypted = false;
$crypt_key = '';
if ($crypt == true && extension_loaded('sodium') == true) {
$crypted = false;
$crypt_key = '';
if ($crypt == true && extension_loaded('sodium') == true) {
}
$hash = jirafeau_hash_file($file_hash_method, $p);
}
$hash = jirafeau_hash_file($file_hash_method, $p);
$np = s2p($hash);
$delete_link_code = jirafeau_gen_random(5);
$np = s2p($hash);
$delete_link_code = jirafeau_gen_random(5);