I need to create FTP-uploader, i am using pycurl and python, but i dont know how to make folder with cURL on ftp's host. Help me please.
Send the data using curl's –d or –data option. To execute a CURL file upload, you need to use the –d command-line option and begin data with the @ symbol. The file's name should come after the data with @ symbol so CURL can read it and send it to the server.
To transfer files to another computer, open an FTP connection to that computer. To move files from the current directory of your computer, use the mput command. The asterisk ( * ) is a wildcard that tells FTP to match all files starting with my . You can also use a question mark ( ? ) to match a single letter.
DESCRIPTION. curl is a tool to transfer data from or to a server, using one of the supported protocols (HTTP, HTTPS, FTP, FTPS, GOPHER, DICT, TELNET, LDAP or FILE). The command is designed to work without user interaction.
You can use the curl option while uploading a file : --ftp-create-dirs
Ex:
curl --ftp-create-dirs -T uploadfilename -u username:password ftp://sitename.com/directory/myfile
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With