Receiving zip file by FTP - Urgent

Hi

I need to receive a zip file by FTP. The file is submitted to TN and i am trying to retrieve the file and write the file to my local file system.

I am using wm.tn.doc:getContentPartData to retrieve the data and write to file system.

The file is ftped as a flat file with content type as application;x-wmflatfile

I get an error saying the file is getting corrupted and am unable to open the zip file.

The winzip error is “start of central directory not found, zip file corrupt, possible cause file transfer error”.

Regards

Sreedhar

At what point are you getting this error??Please elaborate on your flow process/steps etc…Is your FTP and TN receving/extraction part successfull? Are you zipping/unzipping the file before or after TN process??

HTH,
RMG

RMG

Sorry could not reply earlier, the problem is solved, i was not setting the TransferMode hence had problems.

For other incase you get the same problem, send the file in binary mode

Hi,

I am getting the same problem when i attach a winzip file and send it via pub.client.smtp function.

When i try opening the winzip attachment which i got via mail, it says that “file may not be valid archive” and “try downloading file again”. However, source file is properly zipped.

Please help me out.

kausik,

Are you attaching the file to email by giving the file name i.e. location of the file(attachments/filename) or adding the content of file i.e. attachments/content.

I am attaching file to email by adding the content of file ie. attachments/content.

In pub.client.smtp service, under attachements i am passing the content type as “application/zip” (mime type),content in the form of bytes (by getting the target zip file by using pub.file.getfile) and file name as "filename.zip"

Is there any specific reason you are not using the “attachments/filename” parameter. Instead of using pub.file.getfile function, directly pass the fully qualified name of file in attachments/filename and thats it. You won’t even have to pass the content type.

Thx Guys for ur reply’s.

The problem got resolved ,we have to just make “encoding” field in pub.client:smtp service as base 64.

I have been working with zip files since I got a computer. But once I had an unpleasant complicated proposition. My zip archives were lost. Fortunately I entered the Google and came upon - how to restore zip file program on windows xp, it resolved my issue within seconds and ultimately free of charge. What is more I knew how the utility could help and repair any file with *.zip extension.