Hello all,
I’m having issues while trying to upload a CSV file to my Phoenix with LiveView site hosted in fly.io. It works fine locally and even tried deploying to Heroku and worked fine too without any change.
The error I’m getting is the following (fly logs):
2022-08-17T13:02:18Z app[2d9c3130] dfw [info]13:02:18.654 [error] GenServer #PID<0.2223.0> terminating
2022-08-17T13:02:18Z app[2d9c3130] dfw [info]** (File.CopyError) could not copy from “/tmp/plug-1660/live_view_upload-1660741336-554237837513481-1” to “priv/static/uploads/live_view_upload-1660741336-554237837513481-1”: no such file or directory
2022-08-17T13:02:18Z app[2d9c3130] dfw [info] (elixir 1.13.0) lib/file.ex:818: File.cp!/3
2022-08-17T13:02:18Z app[2d9c3130] dfw [info] (sales_point 0.1.0) lib/sales_point_web/live/product_live/import_component.ex:32: anonymous fn/2 in SalesPointWeb.ProductLive.ImportComponent.consume_uploaded_document/1
2022-08-17T13:02:18Z app[2d9c3130] dfw [info] (phoenix_live_view 0.17.11) lib/phoenix_live_view/upload_channel.ex:21: Phoenix.LiveView.UploadChannel.consume/3
I hope someone can help me.
Thanks,
Rodolfo Baeza.