diff --git a/include/ajax.draft.php b/include/ajax.draft.php index 1b7b30d5a97d7136227e11b6e1d38503365c773f..c18dca63d08689b1d9d44cc079cb813601ef64e7 100644 --- a/include/ajax.draft.php +++ b/include/ajax.draft.php @@ -98,12 +98,7 @@ class DraftAjaxAPI extends AjaxController { if ($file[0]['name'] == 'blob') $file[0]['name'] = 'screenshot-'.Misc::randCode(4); - if (isset($file[0]['tmp_name'])) { - $ids = $draft->attachments->upload($file); - } - else { - $ids = $draft->attachments->save($file[0]); - } + $ids = $draft->attachments->upload($file); if (!$ids) { if ($file[0]['error']) {