[core] remove add_image, send_event(DataUpload) is much clearer as to what it's actually doing
This commit is contained in:
@@ -50,7 +50,12 @@ class BulkAddCSV extends Extension
|
||||
*/
|
||||
private function add_image(string $tmpname, string $filename, array $tags, string $source, string $rating, string $thumbfile)
|
||||
{
|
||||
$event = add_image($tmpname, $filename, $tags, $source);
|
||||
$event = send_event(new DataUploadEvent($tmpname, [
|
||||
'filename' => pathinfo($filename, PATHINFO_BASENAME),
|
||||
'tags' => $tags,
|
||||
'source' => $source,
|
||||
]));
|
||||
|
||||
if (count($event->images) == 0) {
|
||||
throw new UploadException("File type not recognised");
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user