Closed mrcasals closed 3 years ago
OMG I found the error.
The context function should not have the param piped, so it should look like this:
def delete_raw_file(%Attachment{} = attachment) do
MyApp.Uploaders.Attachment.delete({attachment.file, attachment})
end
Sorry everyone!
Hi!
I'm trying to delete an attachment that was uploaded via Waffle to the filesystem, and I'm getting this error:
I have an Ecto model called
Attachment
which holds the actual attachment:And here's the uploader I'm using:
The context function to delete the attachment:
And calling this function is when I get the previous error. Any idea what's going on? 😕