Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
Upload a file in a custom created plugin
« previous
next »
Print
Pages: [
1
]
Author
Topic: Upload a file in a custom created plugin (Read 1081 times)
vivekmauli14
Newbie
Posts: 43
Karma: 0
Upload a file in a custom created plugin
«
on:
September 28, 2023, 02:05:30 pm »
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.
Logged
cookiemonster
Hero Member
Posts: 1823
Karma: 95
Re: Upload a file in a custom created plugin
«
Reply #1 on:
September 28, 2023, 04:41:05 pm »
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.
Logged
vivekmauli14
Newbie
Posts: 43
Karma: 0
Re: Upload a file in a custom created plugin
«
Reply #2 on:
September 30, 2023, 06:38:50 am »
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!
Logged
cookiemonster
Hero Member
Posts: 1823
Karma: 95
Re: Upload a file in a custom created plugin
«
Reply #3 on:
October 01, 2023, 09:09:15 pm »
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.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
Upload a file in a custom created plugin