![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.
@leapit/storage
Advanced tools
npm install @leapit/storage
Example
storage: {
dir: './storage',
upload: {
port: 8080,
form: {
//uploadDir: './storage',
keepExtensions: true,
multiples: true,
maxFieldsSize: 2 * 1024 * 1024 // npm issue,not work
},
file: {
ext: ['.gif', '.jpg', '.png'], // '*' for all type file
maxsize: 2 * 1024 * 1024
},
image: {
thumb: true, //need install graphicsmagick/imagemagick on server (https://github.com/aheckmann/gm)
prefix: 'thumb_',
resize: [150, 150, '!'], //[150,150,''] 按照比例缩略
overwrite: false
}
},
restapi: {
port: 9090,
},
persistence: {
url: 'mongodb://localhost:27017/storage',
mongo: {},
files: 'files',
logs:'logs'
}
}
var authApi = {};
authApi = {
// Accepts the connection if the token are valid
authenticate: function authenticate(token, callback) {
var clientid = '';
var userid = '';
console.log(':::::::::: checking token ::::::::::');
console.log(token);
var authorized = (token === 'user.token.here');
if (authorized) {
clientid = 'clientid';
userid = 'userid';
callback(null, clientid, userid);
} else {
callback(new Error('token error.'), clientid, userid);
}
}
};
module.exports = authApi;
###1. Embed in your app(Recommend)
var storage = require('@leapit/storage');
var config = require('./storage.config');
var permission = require('./storage.permission');
storage(config, permission);
Example with express https://github.com/leapit/storage/wiki/Embed-in-express-js
###2. Stand alone
https://github.com/leapit/storage/wiki/Stand-alone
When your server started(e.g run npm start),the terminal will show
Storage upload server run at 8080
Storage download server run at 9090
<form action="http://localhost:8080/?token=user.token.here" enctype="multipart/form-data" method="post">
<input type="text" name="container" value="my-path">
<input type="text" name="tag" value="tag1">
<input type="text" name="tag" value="tag2">
<input type="text" name="description" value="miaosu">
<br />
<input type="text" name="sharelevel" value="1">
<input type="text" name="shareto" value="VJZnd0PFl">
<input type="text" name="shareto" value="E1QwuAPKe">
<br><input type="file" name="upload" multiple="multiple">
<br><input type="submit" value="Upload">
</form>
FAQs
Storage
The npm package @leapit/storage receives a total of 1 weekly downloads. As such, @leapit/storage popularity was classified as not popular.
We found that @leapit/storage 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.