I want to upload a file to an uploads directory in my application. That’s it…
I’ve searched the web and every example I can find assumes you want to store the file or a reference to it in a database. And the examples seem to indicate that you just add the plug data to a data table’s changeset, save the record and the file is magically uploaded.
Since I don’t want to add anything to any database, how do I just write the temporary file held in the plug data to the file system?
Is it as simple as moving the file that is designated in the plug’s ‘path’ to the upload directory using Elixir file processing?