<<< Previous topic - Next topic >>> |
|
Author |
Message |
Tushar chavadar
Joined: 06 Dec 2012 Posts: 2 Location: Pune
|
Posted: 06.12.2012, 11:35 Post subject: How to Upload tar file from HTML webserver to Shell script |
|
|
Hi,
In our Gateway application we are using DNP/9200 ssv module. By using httpd we have create light weight webserver. This web server is in ssv module's cgi-bin folder. When give ip address of ssv module in url of IE Or Mozila then our webserver is opened.
Now my problem is, we want to extract tar file from web server. Means i will upload tar file from HTML web server & it is will transfer through shell script to /tmp folder of ssv.
so we have create new form as upgrade. This upgrade page contains browse button & upgrade button. By browse button we select tar file from local pc on which webserver is running. After click upgrade button that file is download in /tmp folder of ssv.
After upgrade button press we receive only tar file name shell script. But we have receive tar file.
we check with "wget" command but not work . is there any other solution for this.
How can i receive that file in shell script.
Can you please help me regarding this issue. _________________ Our company basically working in wireless Domain. |
|
Back to top |
|
|
hne
Joined: 11 Jul 2008 Posts: 210 Location: Hannover
|
Posted: 08.01.2013, 14:05 Post subject: |
|
|
Hello,
with methode "GET" - like wget used it - is not possible to upload file from local PC into webserver. You must use the method "POST" in your form.
(see here and here)
The posted file is encapsulated into parts of "multipart/form-data". In next step, you must split contents of posted data from header, (tar) file data and other informations. This would be very difficultly in simple script. You maybe should write a C-Program to split the received tar file from all the posted data. _________________ Henry Nestler |
|
Back to top |
|
|
|