469,330 Members | 1,256 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,330 developers. It's quick & easy.

How to to post a zipped file to the server

I am new to javascript and I am battling to get the syntax right to post a zip file to the server.
when the user clicks the button it must send a zipfile called send2serv.zip
to the server.
It must use application/x-zip-compressed
it must pass the username admin
and the password ****
and the file name send2serv.zip

I've done this in delphi successfully but the client needs me to use javascript.
If javascript cannot do this then is their an activex object I can get hold of to pass the parameters to that can be used in Javascript.
May 27 '10 #1
5 2236
Dormilich
8,651 Expert Mod 8TB
it depends where send2serv.zip is located. the only way to send a file on the local file system is using <input type="file">, where (afaik) you cannot set the value by JavaScript.
May 27 '10 #2
Thank you for the input type="file"
I need to pass the filename, username and password to get the file uploaded.
The names are an example only they are not real.
The server would have an address for example http://10.0.etc
The file send2serv.zip is on the C: drive in a folder called Backup
The username alpha
The password ****
How do I pass this in Javascript to get the file uploaded
May 28 '10 #3
Dormilich
8,651 Expert Mod 8TB
you can always call an URI including login/password:

http://login:password@restricted.example.org
May 28 '10 #4
the url is similar to http://10.0.1.....:8080/TeachFile/zip?overwriiteoverwrite=no" so it will not work
May 31 '10 #5
Dormilich
8,651 Expert Mod 8TB
it doesn’t matter, if the domain is named or numbered…
http://login:password@127.0.0.1:8080...teoverwrite=no
May 31 '10 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by Raffi | last post: by
8 posts views Thread by BMM | last post: by
4 posts views Thread by Vilmar Braz„o de Oliveira | last post: by
3 posts views Thread by Jon Glazer | last post: by
reply views Thread by Jochen Neyens | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.