mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-21 16:38:36 -06:00
This commit is contained in:
parent
2723e05d2a
commit
2714ee96f1
@ -112,7 +112,12 @@ class StoreController extends Controller
|
||||
|
||||
return response()->json([], 422);
|
||||
}
|
||||
$helper->saveAttachmentFromApi($attachment, $body);
|
||||
$result = $helper->saveAttachmentFromApi($attachment, $body);
|
||||
if(false === $result) {
|
||||
app('log')->error('Could not save attachment from API.');
|
||||
|
||||
return response()->json([], 422);
|
||||
}
|
||||
|
||||
return response()->json([], 204);
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ trait AttachmentCollection
|
||||
->where(
|
||||
static function (EloquentBuilder $q1): void { // @phpstan-ignore-line
|
||||
$q1->where('attachments.attachable_type', TransactionJournal::class);
|
||||
$q1->where('attachments.uploaded', true);
|
||||
// $q1->where('attachments.uploaded', true);
|
||||
$q1->whereNull('attachments.deleted_at');
|
||||
$q1->orWhereNull('attachments.attachable_type');
|
||||
}
|
||||
|
@ -255,6 +255,7 @@ return [
|
||||
'allowedMimes' => [
|
||||
// plain files
|
||||
'text/plain',
|
||||
'text/html',
|
||||
|
||||
// images
|
||||
'image/jpeg',
|
||||
|
Loading…
Reference in New Issue
Block a user