Skip to content
Snippets Groups Projects
Commit 4ec1602f authored by Jared Hancock's avatar Jared Hancock
Browse files

draft: Fix crash attaching some images

parent 0be7508b
No related branches found
No related tags found
No related merge requests found
...@@ -98,12 +98,7 @@ class DraftAjaxAPI extends AjaxController { ...@@ -98,12 +98,7 @@ class DraftAjaxAPI extends AjaxController {
if ($file[0]['name'] == 'blob') if ($file[0]['name'] == 'blob')
$file[0]['name'] = 'screenshot-'.Misc::randCode(4); $file[0]['name'] = 'screenshot-'.Misc::randCode(4);
if (isset($file[0]['tmp_name'])) { $ids = $draft->attachments->upload($file);
$ids = $draft->attachments->upload($file);
}
else {
$ids = $draft->attachments->save($file[0]);
}
if (!$ids) { if (!$ids) {
if ($file[0]['error']) { if ($file[0]['error']) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment