Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Code example Small modification to curl FTP module
#1

A small modification implemented to CURL FTP module.

1. FTP Put command to send data directly from buffer instead of File. This helps in reducing the File I/O on flash memory.

 (modified ftp_put to read from buffer instead of file)

res=curl.ftp_put_buf('ftp://loboris.eu/test/uploaded_boot.py','esp32','esp32user', buffer)


2. FTP List gets all files info from server. A provision is made to check if a single file exists in server by getting only its attributes and no file body is downloaded.
 (modified ftp_get to exclude body)


res=curl.ftp_get_info('ftp://loboris.eu/ftptest.txt','esp32','esp32user')

esp32/modcurl.c and esp32/libs/espcurl.c files attached. 
This is a small work and requested to verify and comment.



Attached Files
.zip   curl_mod.zip (Size: 15.33 KB / Downloads: 0)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)