0

I have made my own module, that has a form where the user can upload a file. Once the file has been collected, Drupal should open an FTP connection to a server and upload the file into it. I have found "Storage API" and "Media Move" modules that seems to have this kind of functionality, but I have no clue on how use those modules with my custom code. How do I make an FTP connection from Drupal to an external server and upload the file?

  • Does the other server support PHP , then this might be helpful stackoverflow.com/questions/3135787/… – GoodSp33d Jul 10 '12 at 13:16
  • @Terix: Looking for Same issue.Did you complete this task. – Cindrella Oct 16 '12 at 7:14
  • I suggest uploading of files(long background jobs) should be done by a cron job instead. – AgA Jan 8 '13 at 12:23
1

cURL ist the perfect library for this. It's available on most PHP servers. Check this for an example.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.