There's a referenced issue in arc but I think it's arc_ecto's responsibility so I create an issue here.
My requirement is uploading file as base64 encoded string to the server. It's common for small files and is easy to work with JSON API. After googling I found arc support binary, so I thought I can decode base64 to binary and save the file.
arc support passing binary like this Avatar.store(%{filename: "file.png", binary: binary}) but there's no way to pass binary in arc_ecto, The cast_attachments(%{filename: "file.png", binary: binary}) fails. I checked the source and it seems the arc_ecto only support Plug.Upload struct. Is there a way or workaround to achieve this?
There's a referenced issue in arc but I think it's arc_ecto's responsibility so I create an issue here.
My requirement is uploading file as base64 encoded string to the server. It's common for small files and is easy to work with JSON API. After googling I found arc support binary, so I thought I can decode base64 to binary and save the file.
arc support passing binary like this
Avatar.store(%{filename: "file.png", binary: binary})but there's no way to pass binary in arc_ecto, Thecast_attachments(%{filename: "file.png", binary: binary})fails. I checked the source and it seems the arc_ecto only supportPlug.Uploadstruct. Is there a way or workaround to achieve this?