files rename fix
This commit is contained in:
parent
b29e8e4947
commit
868f845102
@ -0,0 +1,2 @@
|
||||
db
|
||||
--
|
||||
@ -44,7 +44,8 @@ class files {
|
||||
throw new \SYSTEM\LOG\ERROR("No matching Cat '" . $cat . "' found.");}
|
||||
if(!file_exists(self::$folders[$cat].$id)){
|
||||
return false;}
|
||||
return rename(self::$folders[$cat].$id, self::$folders[$cat].$newid);
|
||||
$ext = pathinfo(self::$folders[$cat].$id);
|
||||
return rename(self::$folders[$cat].$id, self::$folders[$cat].$newid.'.'.$ext['extension']);
|
||||
}
|
||||
|
||||
private static function getFolder($folder) {
|
||||
|
||||
@ -39,7 +39,7 @@ function register_controlls(){
|
||||
});
|
||||
|
||||
$('.btn_upload').click(function(){
|
||||
var formData = new FormData($('#form_'+$(this).attr('cat'))[0]);
|
||||
var formData = new FormData($('#form_'+$(this).attr('cat')));
|
||||
$.ajax({
|
||||
url: SAI_ENDPOINT+'sai_mod=.SYSTEM.SAI.saimod_sys_files&action=upload&cat='+$(this).attr('cat'), //Server script to process data
|
||||
type: 'POST',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user