Link to home
Start Free TrialLog in
Avatar of peetm
peetmFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Need to POST a binary file and save it

I'd like to write a postfile.asp page - the page is sent [POST] a binary file, which it should save locally.

I've no idea how to go about this - or what the syntax of a page-load on this would be from a user's point of view - i.e., how would a user type in a URL complete with a binary file attached to it to send to this page?
Avatar of Emad Gawai
Emad Gawai
Flag of United Arab Emirates image

try aspupload for uploading any type of file
File uploads are always POSTed (you cannot upload a file with GET). However, they need special form settings. I think this page will tell you what you need to do:

http://www.asp101.com/articles/jacob/scriptupload.asp

Wish I can help
Huji
Avatar of peetm

ASKER

Ok, the thing is that this has to achieved programmatically, that's why I need to know the URL format etc - It's also unlikely that any component can be install on the server.

So, I'm just looking for some asp code that be effectively linked to by a remote application - and that asp page needs to accept a binary file somehow.

Thanks
About the components: What I linked doesn't need a component to get installed. It is pure ASP.

About doing things programmatically: I'm not sure if I've understood what you want to do completely. Is it that, you want a script to automatically upload a set of files to another page, the second page to save the uploaded files somewhere on the server?
Avatar of peetm

ASKER

There'll be just a single page - on the server.

The client is a binary - probably written in VB6.
Oh, I understood what you meant. The answer is this:

First of all, the form should be POST, and not GET. Secondly, it shoudl be encrypted as "multipart/form-data". Read more here:

http://www.15seconds.com/issue/010314.htm

Usually, programming languages allow you to upload a file to a server. I think VB6 does too. But you need to find the correct coding for that. It is not the URL format, but the "encryption" which forces you to use special methods and objects in your client program.

Hope this helps
Huji
ASKER CERTIFIED SOLUTION
Avatar of MELeBlanc
MELeBlanc
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I think the question is not closed fairly. Here, MELeBlanc is awarded in two questions for one solution. I'm going to ask an admin to review this question.
If an admin comes in to award points elsewhere then I have no issue with it... for me this isn't so much about points as for helping others out when I have solved the very same issues.  A number of years back I was attempting to solve this exact problem and came across the website that I referenced in the other question.  I simply shared that and some coding help to solve peetm's problem.  If you look at the other question you will see that I was actually working with and supplying answers for both the client side (VB) and server side (ASP).. essentially answering both questions.. I could have just as easily been cross posting the ASP answers over here but that just seemed kind of pointless and unnecessary.

But again, if an admin deems otherwise then I am not going to argue about it.

-M
Avatar of peetm

ASKER

>>If you look at the other question you will see that I was actually working with and supplying answers for both the client side (VB) and server side (ASP).. essentially answering both questions.. I could have just as easily been cross posting the ASP answers over here but that just seemed kind of pointless and unnecessary.

And that's how I see it.

>>But again, if an admin deems otherwise then I am not going to argue about it.

And again.
Well, I don't work for points as well :) I have been a CV here for a long time, and as we all know, being a CV is about doing lots of work and making lots of (sometimes sensitive) decisions without any gain. However, the points let this site work correctly, and if we want EE to work smoothly, we should reinforce its rules about points. That's all my concern here.