class/SwUploadHandler.php 1 location
|
@@ 54-68 (lines=15) @@
|
51 |
|
* @param $file_name |
52 |
|
* @return null|\stdClass |
53 |
|
*/ |
54 |
|
private function get_file_object($file_name) |
55 |
|
{ |
56 |
|
$file_path = $this->upload_dir . $file_name; |
57 |
|
if (is_file($file_path) && '.' !== $file_name[0] && 'index.html' !== $file_name && 'Thumbs.db' !== $file_name) { |
58 |
|
$file = new \stdClass(); |
59 |
|
$file->name = $file_name; |
60 |
|
$file->size = filesize($file_path); |
61 |
|
$file->url = $this->upload_url . rawurlencode($file->name); |
62 |
|
$file->thumbnail = is_file($this->thumbnails_dir . $file_name) ? $this->thumbnails_url . rawurlencode($file->name) : null; |
63 |
|
|
64 |
|
return $file; |
65 |
|
} |
66 |
|
|
67 |
|
return null; |
68 |
|
} |
69 |
|
|
70 |
|
/** |
71 |
|
* @param $file_name |
class/uploadclass.php 1 location
|
@@ 51-63 (lines=13) @@
|
48 |
|
* @param $file_name |
49 |
|
* @return null|\stdClass |
50 |
|
*/ |
51 |
|
private function get_file_object($file_name) |
52 |
|
{ |
53 |
|
$file_path = $this->upload_dir . $file_name; |
54 |
|
if (is_file($file_path) && '.' !== $file_name[0] && 'index.html' !== $file_name && 'Thumbs.db' !== $file_name) { |
55 |
|
$file = new stdClass(); |
56 |
|
$file->name = $file_name; |
57 |
|
$file->size = filesize($file_path); |
58 |
|
$file->url = $this->upload_url . rawurlencode($file->name); |
59 |
|
$file->thumbnail = is_file($this->thumbnails_dir . $file_name) ? $this->thumbnails_url . rawurlencode($file->name) : null; |
60 |
|
return $file; |
61 |
|
} |
62 |
|
return null; |
63 |
|
} |
64 |
|
|
65 |
|
/** |
66 |
|
* @param $file_name |