I create a FilePart with a name but the file is null. Here is a code
snippet:

String filename = getFileName();
String fiel     = getFile();
method.addPart( FilePart( "fileName", filename, file));

The server expects a parameter "fileName" but I can't always submit a file -
sometimes it's null (filename and file ).

Gtx,
Thomas

-----Urspr�ngliche Nachricht-----
Von: Kalnichevski, Oleg [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 11. M�rz 2003 14:07
An: Commons HttpClient Project
Betreff: RE: MultipartPost - empty FilePart


Thomas
What do you mean by an empty FilePart? A zero-length file? As always, a test
case would greatly simplify my task of tracking down the bug
Cheers
Oleg

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Dienstag, 11. M�rz 2003 13:59
To: [EMAIL PROTECTED]
Subject: MultipartPost - empty FilePart


Hi I want to send a empty FilePart because the server on the other sides
expect a file part but it's not a must to send a file.
If I try to add an empty FilePart I get a NullpointerException.

Gtx,
Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to