![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
attacheable is a Rails/Merb plugin for working with attachments, mostly image attachments.
It is based on file_column, acts_as_attachment and attachment_fu plugins which have some shortcomings:
attacheable is a fork of attachment_fu plugin by technoweenie (http://svn.techno-weenie.net/projects/plugins/attachment_fu/) with implementation of the following features:
Plus, there is an experimental feature of copying file attachments over scp (useful when you have a Rails cluster).
Create a migration:
create_table :images do |t|
t.string :filename
t.string :content_type
t.integer :width
t.integer :height
t.string :type
end
This goes to your ActiveRecord:
class Image < ActiveRecord::Base
has_attachment :thumbnails => {:medium => "120x", :large => "800x600", :preview => "100x100"},
:croppable_thumbnails => %w(preview), :path_prefix => 'public/assets/images', :autocreate => true
validates_as_attachment
end
In your view (editing form):
Use uploaded_data field.
In your view (view a record):
<%= image_tag @image.public_filename(:preview) %>
Note that if you're migrating from acts_as_attachment, you may need to specify partitioned_path like this:
class Image def partitioned_path(*args) [id.to_s] + args end end
You can use regenerate_thumbnails! method to regenerate all thumbnails for an image, like this:
Image.regenerate_thumbnails!(:preview)
Max Lapshin max@maxidoors.ru, http://maxidoors.ru Yaroslav Markin yaroslav@markin.net
FAQs
Unknown package
We found that attacheable 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
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.