
Security News
Insecure Agents Podcast: Certified Patches, Supply Chain Security, and AI Agents
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.
An UPYun Node.js SDK, using request and async.
Which Provides By Simple API Invoke:
npm install upyun-core
// require
var UPYUN = require('upyun-core');
var upyun = new UPYUN('bucket_name', 'user', 'pass');
// all the callbacks looks like
function(err[, data]){
if (err) {
// Do error handling
} else {
// Success
}
}
// callback: function(err){}
Write(Upload) buffer Content Up To The Given path.
According To The Official Documentation, The Directory Depth Levels Of path Should Not Large Than 10.
The path will be built automatically, like mkdir -p path.
upyun.writeFile(path, 'Node.js_Buffer_OR_String', cb);
// callback: function(err, contents){}
Fetch(Download) contents From The Given path.
upyun.fetchFile(path, function(err, contents){
if (err) {
// Do error handling
} else {
// contents will be String or Buffer
}
});
// callback: function(err){}
Remove(Delete) The Certain File From The Given path.
upyun.removeFile(path, cb);
// callback: function(err){}
Create The path.
According To The Official Documentation, The Directory Depth Levels Of path Should Not Large Than 10.
The path will be built automatically, like mkdir -p path.
upyun.createDirs(path, cb);
// callback: function(err){}
Remove(Delete) An EMPTY Directory By Given path.
upyun.removeDir(path, cb);
// callback: function(err){}
Recursively Remove The Given Path(Directory). Before Call This Method, Make Sure To Set "upyun.iDOReallyWantToDestroyDirectories" To true Every Time You Call This.
upyun.iDOReallyWantToDestroyDirectories = true;
upyun.destroyDir(path_you_really_want_to_destroy, cb);
entityvar entity = {
'path': '/storage/images/some_hash.jpg', // the full path of the file or directory
'name': 'some_hash.jpg', // the base name with the file extension name
'time': '1397211136', // the unix timestamp of file last modified
'size': '438112', // the file size in bytes
'type': 'file | folder' // UPYUN.TYPES.FILE | UPYUN.TYPES.FOLDER
};
// callback: function(err, entity){}
Inspect The Entity Of The Given path.
upyun.inspect(path, cb);
// callback: function(err, an_array_of_entities){}
List A Certain Directory By The Given path.
upyun.listDir(path, cb);
// callback: function(err, bytesUsed){}
Get The Total Bytes Used By This Bucket.
upyun.bucketUsage(cb);
// no callback
There are 4 hosts of UPYUN HTTP REST API, choose one of them.
FAQs
Make Use of UPYUN API Much Easier.
The npm package upyun-core receives a total of 0 weekly downloads. As such, upyun-core popularity was classified as not popular.
We found that upyun-core 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
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.

Security News
The planned feature introduces a review step before releases go live, following the Shai-Hulud attacks and a rocky migration off classic tokens that disrupted maintainer workflows.