{"id":18406372,"url":"https://github.com/code-with-rails/filepond-rails","last_synced_at":"2025-07-17T18:08:32.105Z","repository":{"id":65115791,"uuid":"581821994","full_name":"Code-With-Rails/filepond-rails","owner":"Code-With-Rails","description":"An integration library for FilePond and Ruby on Rails","archived":false,"fork":false,"pushed_at":"2023-10-11T11:35:29.000Z","size":1792,"stargazers_count":16,"open_issues_count":7,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-09T18:49:47.665Z","etag":null,"topics":["javascript","javascript-library","ruby-gem","ruby-on-rails","rubygem","rubygems-plugin"],"latest_commit_sha":null,"homepage":"https://codewithrails.com/filepond-rails","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Code-With-Rails.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-24T13:18:24.000Z","updated_at":"2024-12-18T16:55:28.000Z","dependencies_parsed_at":"2024-12-02T17:38:02.852Z","dependency_job_id":null,"html_url":"https://github.com/Code-With-Rails/filepond-rails","commit_stats":{"total_commits":31,"total_committers":2,"mean_commits":15.5,"dds":"0.22580645161290325","last_synced_commit":"e82cd6b92a93b8b34ce00f5d0c6ccd18d08a4f16"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Code-With-Rails/filepond-rails","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-With-Rails%2Ffilepond-rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-With-Rails%2Ffilepond-rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-With-Rails%2Ffilepond-rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-With-Rails%2Ffilepond-rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Code-With-Rails","download_url":"https://codeload.github.com/Code-With-Rails/filepond-rails/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-With-Rails%2Ffilepond-rails/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265642949,"owners_count":23803997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","javascript-library","ruby-gem","ruby-on-rails","rubygem","rubygems-plugin"],"created_at":"2024-11-06T03:08:43.648Z","updated_at":"2025-07-17T18:08:32.035Z","avatar_url":"https://github.com/Code-With-Rails.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# filepond-rails\n\n[![Gem Version](https://badge.fury.io/rb/filepond-rails.svg)](https://badge.fury.io/rb/filepond-rails)\n![Build Status](https://github.com/Code-With-Rails/filepond-rails/actions/workflows/ci.yml/badge.svg)\n\nThis gem allows you to quickly integrate [FilePond](https://github.com/pqina/filepond) with your Ruby on Rails app.\n\n## Requirements\n* Rails 7.0.x and above\n* Use of [importmap-rails](https://github.com/rails/importmap-rails)\n\n## Installation\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'filepond-rails'\n```\n\nAnd then run:\n```bash\n$ bundle\n```\n\nAdd the following to your `application.css`:\n```css\n*= require 'filepond'\n```\n\nAdd `javascript_importmap_tags` in the `head` section of your layout:\n```erb\n\u003c%= javascript_importmap_tags %\u003e\n```\n\nMount `filepond-rails` routes:\n```ruby\nRails.application.routes.draw do\n  mount Filepond::Rails::Engine, at: '/filepond'\nend\n```\n\nNote: You must mount the routes at `/filepond`.\n\n## Usage\n\nThis gem compromises of two parts:\n1. An ingress controller for the FilePond `fetch` and `remove` server calls. The JavaScript code leverages Active Storage's existing direct upload endpoint.\n2. JavaScript ESM module to automatically connect configured elements with the above endpoints.\n\nAt the present moment, the above parts are designed (and assumed) to work together.\n\nThe gem assumes that you set up your models and Active Storage configuration in a standard Rails way. Assuming you have a form that looks like this:\n\n```erb\n\u003c%= form_with model: @user, url: update_avatar_path, method: :post do |f| %\u003e\n  \u003c%= f.label :avatar, 'Update your avatar' %\u003e\n  \u003c%= f.file_field :avatar, class: 'filepond', direct_upload: true %\u003e\n  \u003c%= f.button 'Update' %\u003e\n\u003c% end %\u003e\n```\n\nYou can instantiate the `file_field` component like so:\n\n```js\n// app/javascript/application.js\nimport { FilePondRails, FilePond } from 'filepond-rails'\n\nwindow.FilePond = FilePond\nwindow.FilePondRails = FilePondRails\n\nconst input = document.querySelector('.filepond')\nFilePondRails.create(input)\n```\n\nThe gem's JavaScript provide two available exports:\n1. `FilePond` (which corresponds to the original FilePond library)\n2. `FilePondRails` (which is a convenience helper that integrates and sets up FilePond to work with our `FilePond::Rails::IngressController`\n\n## Development\n\nfilepond-rails is configured with Docker to help developer-contributors be able to easily work on this gem locally.\n\nTo get started:\n\n1. Fork this repository\n2. git clone it to your local machine and cd into it\n3. Run `docker compose build`\n\nTo run the gem through the \"dummy\" app, run:\n\n```bash\ndocker compose up\n```\n\nTo enter the development environment where you can run `bin/rails g controller` and other commands:\n\n```bash\ndocker compose run app bash\n```\n\nYou should now be able to run tests locally within this bash container:\n\n```bash\nbin/rails test \u0026\u0026 bin/rails app:test:system\n```\n\n## Reference\n* Read [How to create a Ruby on Rails gem from your existing code](https://codewithrails.com/create-rails-gem) for a background on this gem\n\n## License\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-with-rails%2Ffilepond-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-with-rails%2Ffilepond-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-with-rails%2Ffilepond-rails/lists"}