在Heroku上上传Rails中的图像通过API Imgur [英] Uploading an image in Rails on Heroku to Imgur via API

查看:273
本文介绍了在Heroku上上传Rails中的图像通过API Imgur的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能使用imgur的API通过滑轨在Heroku上上传图片(写有限性?)

Is it possible to upload an image using imgur's api via Rails on Heroku (write limitability?)

我在看下面的宝石:

https://github.com/vanntastic/imgur

您将如何处理指向实际的文件与 upload_file 方法上传的实际过程?

How would you handle the actual process of pointing to the actual file to upload with the upload_file method?

推荐答案

您可以做到这一点,因为你有机会获得tmp目录。当一个文件被下载这个tmp目录上。

You can do that, because you have access to tmp directory. When a file is download on this tmp directory.

这篇关于在Heroku上上传Rails中的图像通过API Imgur的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆