mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 02:45:58 +00:00
This commit is contained in:
@@ -112,7 +112,12 @@ class StoreController extends Controller
|
|||||||
|
|
||||||
return response()->json([], 422);
|
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);
|
return response()->json([], 204);
|
||||||
}
|
}
|
||||||
|
@@ -93,7 +93,7 @@ trait AttachmentCollection
|
|||||||
->where(
|
->where(
|
||||||
static function (EloquentBuilder $q1): void { // @phpstan-ignore-line
|
static function (EloquentBuilder $q1): void { // @phpstan-ignore-line
|
||||||
$q1->where('attachments.attachable_type', TransactionJournal::class);
|
$q1->where('attachments.attachable_type', TransactionJournal::class);
|
||||||
$q1->where('attachments.uploaded', true);
|
// $q1->where('attachments.uploaded', true);
|
||||||
$q1->whereNull('attachments.deleted_at');
|
$q1->whereNull('attachments.deleted_at');
|
||||||
$q1->orWhereNull('attachments.attachable_type');
|
$q1->orWhereNull('attachments.attachable_type');
|
||||||
}
|
}
|
||||||
|
@@ -255,6 +255,7 @@ return [
|
|||||||
'allowedMimes' => [
|
'allowedMimes' => [
|
||||||
// plain files
|
// plain files
|
||||||
'text/plain',
|
'text/plain',
|
||||||
|
'text/html',
|
||||||
|
|
||||||
// images
|
// images
|
||||||
'image/jpeg',
|
'image/jpeg',
|
||||||
|
Reference in New Issue
Block a user