FtpWrite
i am using ftplib for transferring data from client to pc ,i have to send images from webcam to my server i use following code:
FtpInit();
netbuf *buff,*data;
if(FtpConnect("192.168.1.31",&buff))
printf("\nConnection Established");
else
printf("\nConnection Not Established");
if(FtpLogin("monitor","picture",buff))
printf("\nUser Connected");
else
printf("\nUser not Connected");
FtpAccess(vd->v_filename,FTPLIB_FILE_WRITE,FTPLIB_ASCII,buff,&data);
if(FtpWrite((unsigned char*)buf,size,data))
printf("\nFile Send\n");
else
printf("\nFile not send\n");
FtpClose(data);
FtpQuit(buff);
fclose(fp);
return 0;
}
i also include lib i.e. ftblib.h
it is transerring data with right file size but when i open image there is no display.
-- INSERT -- 131,1 31%
|