How to send a file from a SD card to an FTP server...

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to send a file from a SD card to an FTP server...

跳至解决方案
1,101 次查看
KineX
Contributor II

Hi,

 

I am able to create file on the SD card usign MFS... and I am able to connect to a FTP server using RTCS.... but if I want to send a file to an FTP server using RTCS... how I get access to my files?

 

I tried:

 

FTP_command_data(handle, "STOR a:test.txt\r\n", stdout,          stdout, FTPMODE_PORT | FTPDIR_RECV);

 

before using this I mounted my SD as a: like in the tower demo...

 

and the test.txt file exists on the SD card...

 

Maybe I missed an information in the doc...

 

Thank you

 

标签 (1)
标记 (1)
0 项奖励
1 解答
462 次查看
KineX
Contributor II

Sorry I was wrong all the way...

 

 

For the ones that are interested...

 

fd is a file pointer opened in read for the file you want to transfer...

 

And don't forget to put the right direction... FTPDIR_SEND ... 

 

response = FTP_command_data(handle, "STOR test.txt\r\n", stdout, fd, FTPMODE_PORT | FTPDIR_SEND);

 

As always! RTFM!

 

Best regards

 

在原帖中查看解决方案

0 项奖励
1 回复
463 次查看
KineX
Contributor II

Sorry I was wrong all the way...

 

 

For the ones that are interested...

 

fd is a file pointer opened in read for the file you want to transfer...

 

And don't forget to put the right direction... FTPDIR_SEND ... 

 

response = FTP_command_data(handle, "STOR test.txt\r\n", stdout, fd, FTPMODE_PORT | FTPDIR_SEND);

 

As always! RTFM!

 

Best regards

 

0 项奖励