![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.
The d2s3 (direct to s3) gem adds is a simple Ruby on Rails helper that generates an upload form that will take a given file and upload it directly to your S3 bucket, bypassing your server. This has various benefits, the biggest being that a large upload will not tie up your server from serving other requests. This gem is based on the instructions from the following Amazon tutorial: http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1434
This was built as a solution to a problem we had where images being uploaded to be processed by Paperclip were consuming Thin servers so they were unable to process other requests.
gem install d2s3
s3_http_upload_tag
helper form tagWe don't have immediate processing of our images with this workflow, but it's very quick assuming how large the queue is and how many back end processes we have actually running through the queue.
<%= s3_http_upload_tag :key => 'uploads',
:content_type => 'image/jpeg',
:redirect => image_processing_url,
:acl => 'public-read',
:max_filesize => 5.megabytes,
:submit_button => '<input type="submit" value="Upload" class="button" id="upload-button">',
:form => {:style => 'display: inline;'} %>
The above helper will generate the following similar HTML form, generating all of the appropriate field keys, policy, and signature based on your Amazon Web Services YAML configuration file. The form parameter also accepts a class and id for further customization.
<form action="https://YOUR_S3_BUCKET.s3.amazonaws.com/" method="post" enctype="multipart/form-data" style="display: inline;">
<input type="hidden" name="key" value="uploads/${filename}">
<input type="hidden" name="AWSAccessKeyId" value="YOUR_AWS_ACCESS_KEY">
<input type="hidden" name="acl" value="public-read">
<input type="hidden" name="success_action_redirect" value="/image_processing_url">
<input type="hidden" name="policy" value="YOUR_POLICY_DOCUMENT_BASE64_ENCODED">
<input type="hidden" name="signature" value="YOUR_CALCULATED_SIGNATURE">
<input type="hidden" name="Content-Type" value="image/jpeg">
<input name="file" type="file"><input type="submit" value="Upload" class="button" id="upload-button">
</form>
Parameters: {"bucket"=>"BUCKET_NAME",
"etag"=>"ETAG_HASH",
"action"=>"YOUR_REDIRECT_URL",
"controller"=>"CONTROLLER",
"key"=>"PATH/FILENAME.EXTENSION"}
<input type="submit" value="Upload">
Thanks to the s3-swf-upload plugin which code was borrowed from to make this project happen.
FAQs
Unknown package
We found that d2s3 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.