Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Upload files to Rackspace Cloud or Amazon S3 by URL or file, with automatic image resizing and thumbnails.
gem install pushfile
or add to Gemfile.
# The settings are stored in ./config/pushfile.yml
@settings = YAML.load_file(File.join(Dir.pwd, 'config', 'pushfile.yml')).deep_symbolize_keys
# The provider, amazon or rackspace
@provider = 'amazon'
# Mode, default is development
@mode = ENV['RACK_ENV'] || 'development'
# Debug
Pushfile.debug = false
Create a config/pushfile.yml for your settings.
See the example pushfile.yml for an example.
If you define an image config, any images you upload will be automatically resized before uploading. You can define both the desired max height and width. All images will also be thumbnailed.
For more examples have a look at the tests for Pushfile.
# Require pushfile if not using Bundler
require 'pushfile'
# Set up a new upload from web server params
# The Froala editor support is automatic
u = Pushfile::Upload.new(params)
# Ajax upload with progress support, pass the request body StringIO object
u = Pushfile::Upload.new(params.merge(:stream => request.body))
# Set up a new upload from local file
u = Pushfile::Upload.new(:filename => 'name.jpg', :tempfile => '/tmp/name.jpg')
# Upload from remote URL
u = Pushfile::Upload.new(:url => 'http://fugroup.net/images/fugroup_logo1.png')
# Actually upload file to CDN
u.create
# Get uploaded url with data
u.status # => Hash with urls and data
# Example response hash
{
# The file URL
:url => "http://f.7i.no/1484109810_fugroup_avatar.jpg",
# The thumbnail URL (only for images)
:thumb_url => "http://f.7i.no/1484109810_fugroup_avatar_thumb.jpg",
# The size of the file after resizing
:size => 40288,
# The file's mime type
:mimetype => "image/jpeg"
}
# Remove file from CDN
u.destroy(url)
Created and maintained by Fugroup Ltd. We are the creators of CrowdfundHQ.
@authors: Vidar
FAQs
Unknown package
We found that pushfile 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.