Upload a file in a custom created plugin

Started by vivekmauli14, September 28, 2023, 02:05:30 PM

Previous topic - Next topic
I was trying to create a plugin with reference to the HelloWorld plugin from the official documentation, I need to upload a file from the UI. I have created my volt file and inside that I have my upload file form. I am not able to understand how I take that input file and store it in /tmp.
Please guide me on this, it would be so helpful if you could give me any references about the same.


Not specific to plugins or development but to my knowledge there is no way to upload files to the appliance from the UI.
Needs to drop to a console and use commands like scp, etc.
There are ways to use winscp and that sort of clicky ways but IMO not worth the effort when a simple command will do it in a fraction of a second.

The plugin I am designing is for the purpose of taking a file as input from the user and extracting encrypted data from the file. Other scripts are just working fine but I am stuck in designing the input file handling mechanism.

Thanks!

Ah. Sorry I misunderstood.
So you want to know how to get your plugin code to import data. Seems like a development question.
https://github.com/opnsense/docs/blob/master/source/development/howtos.rst
aka the dev docs seem to suggest the code can be php.