Closed yksflip closed 5 months ago
@yksflip Code looks good to me :+1:
Though I do have to admit I haven't tried it out and I wonder why #1037 is happening in the first place:
The fact that attachments are stored in the same db table alone shouldn't cause any performance issues, should it? Maybe this could have been solved by adding attachment_data
to the ignored_columns
and only load that field whenever we really want to deliver the file contents...?
Anyhow, moving it to active storage is much cleaner :+1:
thx for reviewing! Ah I see, yeah maybe I concluded a bit too quickly, that might have been enough to resolve the issue.
Until now invoice attachments were stored in the database directly, this led to performance issues see #1037. This PR migrates the invoice attachments to use active storage. Additionally multiple attachments are now supported, a small preview is rendered and the delete flow was adapted.
fixes #1037