- 授权协议: MIT
- 开发语言: Ruby
- 操作系统: 跨平台
- 软件首页: http://markevans.github.io/dragonfly/
- 软件文档: http://markevans.github.io/dragonfly/
- 官方下载: https://github.com/markevans/dragonfly
软件介绍
Dragonfly 是一个 Ruby gem 用于动态处理 Rails、Sinatra 等框架的图像上传。
示例代码:
如果你想生成缩略图:
class User < ActiveRecord::Base # model
dragonfly_accessor :photo
end
<%= image_tag @user.photo.thumb('300x200#') # view %>在 Sinatra 下生成文本图像
get "/:text" do |text| Dragonfly.app.generate(:text, text, "font-size" => 32).to_response(env) end
生成附件
wav = Dragonfly.app.fetch_url("http://free.music/lard.wav") # GET from t'interwebs
mp3 = wav.to_mp3 # to_mp3 is a custom processor
uid = mp3.store # store in the configured datastore, e.g. S3
url = Dragonfly.app.remote_url_for(uid) # ===> http://s3.amazon.com/my-stuff/lard.mp3
JavaScript开发王
张亚飞 / 2008-6 / 65.00元
《网站开发专家·JavaScript开发王》详细介绍使用JavaScript脚本开发应用程序,并融合在网页中实现动态网页,内容也包含DHTML和AJAX。这《网站开发专家·JavaScript开发王》有严格的逻辑性,不论是JavaScript语言、DHTML,还是AJAX,《网站开发专家·JavaScript开发王》首先帮助用户建立首要的、基础的正确认知,然后通过实例,说明如何利用JavaScri......一起来看看 《JavaScript开发王》 这本书的介绍吧!
