I’m trying to use waffle to handle the upload with LiveView uploads and receive the following error: [error] {:error, :invalid_file_path}.
I’m building a %Plug.Upload{content_type: content_type, filename: filename, path: path} struct which is then sent over as the “image” attribute to my schema that has my Waffle uploader type for field image. But in the cast_attachments function it returns the error changeset:
Mostly because I am making use of the image transformations/versions that Waffle makes easy to do. If my situation were more direct upload and no any image manipulation I would use the those instructions.
Yes, you are right that I could simply write my own image conversions, but our team preference is to use a standardized library that has tests/documentation.
This does work without live view. And changing the path to filename did not work. I will try the copy to a tmp file and then use that in the %Plug.Upload{}. I am still not sure why this does not work.