From a desktop applicarion UP to a server script

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Hi all

I belong to the comp.lang.clipper.visual-objects news group.

From within our software [ ] we are posting data to a php
script. It works well with uploading text file attachments.

I now want to add an attachments pdf attachments as well ...
this is the code for the part within the boundaries

the header is
// create a boundary
cBoundary := "--UPLOAD-BOUNDARY--wigglewoggle--UPLOAD-BOUNDARY--"
// setup the header
cHeader :=     "Accept: *" + "/" + "*" + CRLF + ;
"Content-Type: multipart/form-data; boundary=" + cBoundary + CRLF +

the part is

[Content-Disposition: form-data; name="File1"] + CRLF + ;
[Content-Type: application/octet-stream] + CRLF  + ;
[Content-Transfer-Encoding: base64]  + CRLF + CRLF + ;
B64EncFile("C:\test.pdf") + CRLF + ;

the uploaded file is attached to the return email ok, but adobe
doesn't like it ...

can anyone see what i am doing wroong ?



Re: From a desktop applicarion UP to a server script

richard.townsendrose schreef:
Quoted text here. Click to load it

Hi richard,

That is hard to tell from here.
First thing I would do is compare both files (original end the one that
went through email), and see what is different.

Also, is that B64EncFile function you are using above producing the
right output?
I think it should produce the same results as PHP's base64-encode.

You need some way of comparing both (base64)outputs.
I don't know if you have software for this.

Maybe make a md5 hash of both outputs?

If both base64 encodings give the same output, something else goes wrong

Erwin Moller

"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies, and the
other way is to make it so complicated that there are no obvious
deficiencies. The first method is far more difficult."
-- C.A.R. Hoare

Re: From a desktop applicarion UP to a server script [offtopic]

Quoted text here. Click to load it

I must say that English is not my strongest language, but I think the above
sentence makes no sense.
Can a person "belong" to a group? Doesn't it mean the group *owns* this
I think this would sound better: "I am a member of ... the group" or "I am a
part ...".


Site Timeline