fetch images from FTP server using Google Apps Scr

2020-02-06 16:46发布

I need to fetch some images that are stored in a FTP server, using Google Apps Script

The images are accessible only by FTP as

ftp://user:password@ftpsite.com/path2photos/photo123.jpg

Any ideas?

Thanks

2条回答
该账号已被封号
2楼-- · 2020-02-06 17:13

I have successfully gotten images off of remote servers into google apps script via the use of the UrlFetchApp Class.

https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app

查看更多
Emotional °昔
3楼-- · 2020-02-06 17:26

It's not possible to make outbound FTP requests from Google Apps Script (there is a similar restriction from App Engine as well).

You are options are either to find an HTTP interface to the server (some sites offer both HTTP and FTP), or download the files through an FTP client and then upload to Google Drive and then access those files from there.

Feel free to look for/log an item in the Issue Tracker.

查看更多
登录 后发表回答