Hi, I am trying to connect to an FTPS server using elixir. My goal is to simply be able to upload/download files to/from specific directories. I have found a lot of information on FTP but not on FTPS. Are there any good libraries I can use to do FTPS in Elixir? If not, how do I get the Erlang :ftp module to connect with SSL/TLS? I’ve never used Erlang directly before so the documentation I found here http://erlang.org/doc/man/ftp.html#open-2 is a little less than helpful.
I didn’t do it so far, but after glancing over the docs, you need to provide tls: […], if the list is empty thats enough to active the TLS layer, but if you need to pass in options, you can find them in the :ssl.ssloption/0-type.
Thanks, what confused me was the way the documentation was written then. I saw that part as well but I didn’t know how “tls_options()” was actually supposed to be written out. I’ll give it a shot tomorrow and update this post accordingly.
Since it’s an erlang module, I expect that you will need to use erlang strings (that in Elixir are charlists - note the single quotes) and therefore, using your example:
Yeah, those huge nested typespecs that the erlang documentation uses can be confusing at times… Especially if mentioned types are sometimes only locally scoped and sometimes global and sometimes remote, and linking is very bad between them. Its often manually drilling and hunting them down .