Socket
Book a DemoInstallSign in
Socket

nyoibo

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nyoibo

0.0.3.3
bundlerRubygems
Version published
Maintainers
1
Created
Source

= Nyoibo

A websocket file uploader with progressbar module.

== Features

=== Any frameworks You can use Rails or Sinatra and so on, especially this contains rails generator.

== Install(gem) $ gem install nyoibo

== Install(bundler) Put this line in your Gemfile: gem 'nyoibo'

Then bundle: $ bundle install

== Usage(Rails 3.1) ==== Generate config and coffee-script files $ rails g nyoibo:install

=== View <%= ws_form_for(@post) do |f| %> file: <%= f.file_field :photo, :size => 40 %>
comment: <%= f.text_field :comment, :size => 40 %>
<%= f.submit 'upload' %> <% end %>

=== Write callback on Controlller class SomeController < ApplicationController before_upload "/" do |params| if params["confirm"] == false return false # Not to start uploading if return false. end end

after_upload "/" do |params, binary|
  File.open("/tmp/#{params['filename']}", "wb:binary") do |f|
    f.write(binary)
  end
end

end

== Usage(Sinatra) See test/example.rb

== Questions, Feedback

Message me on Github (yalab) or Twitter (@yalab)

== Licence MIT-LICENSE

== Copyright Copyright (c) 2011 Atsushi Yoshida(yalab).

FAQs

Package last updated on 16 Jul 2011

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.