Update storage.php

This commit is contained in:
Namhyeon Go 2019-06-15 17:34:14 +09:00 committed by GitHub
parent c7b89a5ace
commit 548d5f643e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,7 +74,7 @@ if(!check_function_exists("get_storage_url")) {
}
if(!check_function_exists("move_uploaded_file_to_storage")) {
function move_uploaded_file_to_storage($options=array()) {
function move_uploaded_file_to_stroage($options=array()) {
$response = array(
"files" => array()
);
@ -113,12 +113,21 @@ if(!check_function_exists("move_uploaded_file_to_storage")) {
if(count($upload_allow_ext) == 0 || in_array($upload_ext, $upload_allow_ext)) {
if(move_uploaded_file($files[$k]['tmp_name'], $upload_file)) {
// get file source name
$upload_source_name = $files[$k]['name'];
if(strlen($upload_source_name) == 0) {
$upload_source_name = $upload_name;
}
// make file data
$response['files'][$k] = array(
"storage_type" => $storage_type,
"upload_ext" => $upload_ext,
"upload_name" => $upload_name,
"upload_file" => $upload_file,
"upload_url" => $upload_url,
"upload_source_name" => $upload_source_name,
"upload_size" => filesize($upload_file),
"upload_error" => ""
);
} else {