FTP transfers


#1

Hello everybody !

I have a question : how to do FTP uploads ? I have seen some people talking about that and the URL class in the forums, the functions withFileToUpload / createInputStream. But I don’t understand how to use it and how to specify information like the folder where I want to put the file, or the login/password…

Thanks in advance !


#2

I don’t know if the URL class handles FTP (i guess on windows it would since it uses that nasty windows calls), other platform i dunno in short. Create a URL object, add a file to upload with withFileToUpload, then call readEntireTextStream () (or any other read method), and the upload will start, in return you’ll get a response from the server.
that’s it.


#3

Thanks, I’m going to check this out , or maybe to try the cURL library :wink:


#4

I have been using cURL library for file uploads. It’s not a bad option.


#5

If you could use a HTTP upload instead, the juce classes handle that just fine.


#6

I have been able to make that work with cURL, but I’d like to use JUCE only instead…

The file I want to upload has to be put on my webpage. I don’t know if there are some http commands to handle uploading on ftp servers… I’m looking for that :wink: