mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-21 12:19:56 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1448 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
bf509404b4
commit
43de485436
2 changed files with 38 additions and 8 deletions
|
|
@ -237,16 +237,17 @@
|
|||
if($files && !is_array($files)) $files = array($files);
|
||||
if(count($files)) {
|
||||
foreach($files as $key => $val) {
|
||||
$filename = $val->attrs->name;
|
||||
$downloaded_count = (int)$val->downloaded_count->body;
|
||||
$file_buff = base64_decode($val->buff->body);
|
||||
$filename = $val->filename->body;
|
||||
$url = $val->url->body;
|
||||
$download_count = (int)$val->download_count->body;
|
||||
|
||||
$tmp_filename = './files/cache/tmp_uploaded_file';
|
||||
FileHandler::writeFile($tmp_filename, $file_buff);
|
||||
|
||||
$file_info['tmp_name'] = $tmp_filename;
|
||||
$file_info['name'] = $filename;
|
||||
$this->oFileController->insertFile($file_info, $this->module_srl, $args->document_srl, $downloaded_count);
|
||||
if(FileHandler::getRemoteFile($url, $tmp_filename)) {
|
||||
$file_info['tmp_name'] = $tmp_filename;
|
||||
$file_info['name'] = $filename;
|
||||
$this->oFileController->insertFile($file_info, $this->module_srl, $args->document_srl, $download_count);
|
||||
}
|
||||
@unlink($tmp_filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue