Update storage.php

This commit is contained in:
Namhyeon Go 2018-10-03 01:14:14 +09:00 committed by GitHub
parent a545bd29b8
commit db8a86400a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -164,6 +164,9 @@ if(!function_exists("remove_storage_file")) {
$upload_base_url = get_storage_url($storage_type);
$upload_filename = $upload_base_path . "/" . $filename;
// add option: encryption
$encryption = get_value_in_array("encryption", $options, "");
if(file_exists($upload_filename)) {
if(!array_key_empty("chmod", $options)) {
@chmod($upload_filename, $options['chmod']);
@ -200,6 +203,9 @@ if(!function_exists("write_storage_file")) {
$upload_base_url = get_storage_url($storage_type);
$upload_filename = $upload_base_path . "/" . $filename;
// add option: encryption
$encryption = get_value_in_array("encryption", $options, "");
if(file_exists($upload_filename) && in_array($mode, array("fake", "w"))) {
if(!array_key_empty("filename", $options)) {
$result = $upload_filename;