开发者

Net::FTPPermError (500 I won't open a connection to 10.10...... (only to 174.12........)

I have a rails app deployed to heroku. I have used paperclipftp to upload files to an ftp server, as heroku doesn't give much features with file uploading. So when I try to 开发者_高级运维upload a file and save a record, I get this error.

Net::FTPPermError (500 I won't open a connection to 10.10...... (only to 174.12........)

I don't know why this is coming up. After some searching I came to know that Heroku doesn't allow active FTP connections so tried to establish a passive connection by editing the paperclipftp file.

I added this line in its initialize block

@ftp.passive = @ftp_credentials[:passive] if @ftp_credentials.has_key?("passive") and passed a variable [passive:true] in my YAML config file. But still it doesn't work.

Please Help. Thanks in advance.


have you found an answer to your problem ? I'm facing the exact same issue and do not know how to bypass this. A solution could be to use Amazon S3 to save your file. I will check in this direction and let you know.

Regards,

Luc

EDIT (28/03/11): S3 is definitively a great solution, very easy to setup. On top of this it's really cheap if you do not have tons of pictures to upload

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜