
Security News
CISA’s 2025 SBOM Guidance Adds Hashes, Licenses, Tool Metadata, and Context
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
= File Uploader
Focus more on your domain not file upload. Let file_uploader do it.
== Installation
gem install file_uploader
== Usage in Rails
Open and edit config/environment.rb and add a line in Rails::Initializer.run do |config|
config.gem "file_uploader"
In your controller
class UploadController < ApplicationController
def index
if request.post?
uploader = FileUploader.create # File is uploaded to public/upload directory
uploader.save(params[:uploader][:file]) { |path|
render :text => "#{path} is successfully saved."
}
end
end
end
Upload to a different directory
uploader = FileUploader.create "public/a/b/c/d/e/f" # Directory hierarchy will be created and file will be saved to that location
== More
Uploaded filename is sanitized and will have a random prefix automatically to prevent duplication.
FileUploader.save accept a block with path to the uploaded file.
== Sinatra?
FAQs
Unknown package
We found that file_uploader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.