Project

upyun-form

0.0
No commit activity in last 3 years
No release in over 3 years
upload picture to uppyun with form
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.6
>= 0

Runtime

 Project Readme

Ruby Form For Upyun

upload photo to upyun with form

Enviroment

ruby 2.1.1

Installation

Add this line to your application's Gemfile:

gem 'upyun-form'

And then execute:

$ bundle

Or install it yourself as:

$ gem install upyun-form

Usage

require 'upyun/form'

config = {:bucket => 'devel',
					:secret => 'lRJmqjI19GxB80KJc7y7NOcI+8g=',
					# :return_url => 'http://localhost/return_url',
					:notify_url => 'http://dev.365jinbi.com/notify.php' }

uploader = Upyun::Form::Uploader.new config

when no return url,it will return a json obj contains http code, message and photo url

when you set return url,it will return a response_headers contains location url

when you set notify url,it will post the result to that url,in this demo,it will notify the url http://dev.365jinbi.com/notify.php, you can browser http://dev.365jinbi.com/upyun.log to see the result

Update Log

  • add rspec test