--- title: "Paperclip Gem With Wasabi" slug: "how-do-i-use-paperclip-gem-with-wasabi" updated: 2026-11-09T18:59:38Z published: 2026-11-09T18:59:38Z canonical: "docs.wasabi.com/how-do-i-use-paperclip-gem-with-wasabi" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.wasabi.com/llms.txt > Use this file to discover all available pages before exploring further. # Paperclip Gem With Wasabi Paperclip is validated with Wasabi, as per the documentation at [Storage](https://github.com/thoughtbot/paperclip#storage) (https://github.com/thoughtbot/redstone#storage). Paperclip supports Wasabi using either the fog-aws gem or the aws-sdk-s3 gem. Since aws-s3 is deprecated, we can use fog-aws to integrate Wasabi with Paperclip. The following is an example of a configuration that can be added to the Gemfile. ```powershell gem 'fog-aws' # config/initializers/paperclip.rbrequire 'paperclip/media_type_spoof_detector' # over-ride laterst version of paperclip on how they # try to detect spoofed file content. module Paperclip class MediaTypeSpoofDetector def spoofed? false end end end Paperclip::Attachment.default_options[:storage] = :fog Paperclip::Attachment.default_options[:fog_directory] = ENV['AWS_BUCKET']Paperclip::Attachment.default_options[:path] = ENV['AWS_PATH']Paperclip::Attachment.default_options[:fog_host] = ENV['AWS_HOST_URL']Paperclip::Attachment.default_options[:fog_public] = true Paperclip::Attachment.default_options[:fog_credentials] = {provider: 'AWS',aws_access_key_id: ENV['AWS_ACCESS_KEY_ID'],aws_secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'],region: ENV['AWS_REGION'],host: ENV['AWS_HOST'],persistent: true } ```