Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

godmin-uploads

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

godmin-uploads

  • 0.11
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

Godmin Uploads

Gem Version

Godmin Uploads is a file upload component for Godmin that uses refile for uploads.

Installation

Add the gem to the application's Gemfile:

gem "godmin-uploads"

Or to the admin engine's gemspec:

s.add_dependency "godmin-uploads", "~> x.x.x"

Require the gem's stylesheet and javascript:

 *= require godmin
 *= require godmin-uploads
//= require godmin
//= require godmin-uploads

Usage

See the refile documentation for info on how to configure storage location, set up your model etc. Once that is done, require godmin-uploads in your application.js and application.css.

Then, simply use the uploader in your form like so:

<%= form_for(@resource) do |f| %>
  <%= f.input_field :title %>
  <%= f.text_field :body %>

  <%= f.uploader :attachment, preview: true, remove: false %>
<% end %>

The preview option should only be used for image attachments.

By setting remove: false the uploader's remove image action is hidden.

Contributors

https://github.com/varvet/godmin-uploads/graphs/contributors

License

Licensed under the MIT license. See the separate MIT-LICENSE file.

FAQs

Package last updated on 15 Feb 2018

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc