![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.
s3-check-rename
Advanced tools
Clean the file name check if the name exists in S3 bucket and if the name exists add a index to the name to avoid override the file.
#S3 Check and Rename
This module provide a way to clean the filename and check if the name of the file exists in a S3 Bucket and provide a alternative name if the file exists to avoid override.
To clean the name the module remove the odd characters and spaces.
The alternative name add a increasing index in the end of the filename if the filename exists.
#####Ejem:#####
"crème brûlée.png" will be rename to "creme-brulee.png" if the file doesn't exist but if the file exists will be rename to "creme-brulee-0.png".
###Requirements### This module use aws-sdk package to get the bucket info for this we need create a folder called .aws in the home directory of our machine and put the AWS credentials file in the folder.
###How to use###
This module is helpful to use with sails.js s3-skipper module to upload files to amazon and maintain a better name more close to the original name. The example is a modification of FileController.js on sails 101 examples.
function(req, res) {
var S3CR = require('s3-check-rename'),
s3CRename = new S3CR('bucketName'),
upload = req.file('avatar')._files[0].stream,
originalName = upload.filename;
s3CRename.check(originalName, function(err, name){
req.file(req.param('id')).upload(
{
saveAs: name,
adapter: require('skipper-s3'),
bucket: 'bucketName',
key: "aws key",
secret: "aws secret"
}, function whenDone(err, uploadedFiles) {
if (err) return res.serverError(err);
else return res.json({
files: uploadedFiles,
textParams: req.params.all()
});
});
});
}
FAQs
Clean the file name check if the name exists in S3 bucket and if the name exists add a index to the name to avoid override the file.
The npm package s3-check-rename receives a total of 2 weekly downloads. As such, s3-check-rename popularity was classified as not popular.
We found that s3-check-rename 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.