Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
node-openload
Advanced tools
An Openload API wrapper for Node.JS using Promises.
npm install --save node-openload
Create an instance by using the following configuration:
const openload = require('node-openload');
const ol = openload({
api_login: YOUR-API-LOGIN-HERE,
api_key: YOUR-API-KEY-HERE,
});
Below the available functions are listed. The structure of the returned object may be looked up at the API documentation.
By default, this module returns only the result
property from the API response.
Sample function call:
ol.getAccountInfo()
.then(info => console.log(info)); // Prints account info
Returns information about your account.
Returns a download ticket, needed for actually downloading desired file afterwards.
file
: The ID of your requested file.
Caution:
captcha_url
property holding an image link in the result.509: Bandwidth usage exceeded
error might be returned, this is the API's fault, not the fault of this module. Then a file download is not possible at this time.Returns a download link for the requested file.
obj
: Object containing data for the download:
{
file: // mandatory
ticket: // mandatory
captcha_response:
}
obj.file
: The ID of your requested file.obj.ticket
: The previously generated ticket.captcha_response
: The response to the retrieved captcha image (only if there was a captcha_url
returned with the download ticket).Combines getDownloadTicket(file) and getDownloadLink(obj).
Either returns download link, or, if Captcha is necessary, returns response of getDownloadTicket(file).
Returns info about given file id.
file
: might consist of an Array or a string of comma-seperated file IDs. Max 50 IDs allowed.
Deletes files based on given file id.
file
: might consist of an Array or a string of comma-seperated file IDs. Max 50 IDs allowed.
List contents (folders, files) of given folder id.
folder
: The folder ID you want the contents listed of. (not required)
Duplicate of listFolder(folder).
Upload a file from a remote URL.
obj
: Object containing data for the upload:
{
url: // mandatory
folder:
headers:
}
obj.url
: The URL to the resource you want to upload.obj.folder
: The folder ID you would like to upload to. (not required)obj.headers
: If the desired resource needs special HTTP headers, please look up the API documentation.Check the upload status of a previously initiated remote upload.
obj
: Object containing data for the upload:
{
id:
limit:
}
obj.id
: The remote upload ID. (not required)obj.limit
: Limit results (Default 5, Max. 100). (not required)Perform an upload of a local file.
obj
: Object containing data for the upload:
{
file: // mandatory
folder:
filename:
contentType:
}
obj.file
: A buffer or the local path of your desired file.obj.folder
: The folder ID you want to upload to. (not required)obj.filename
: The file's name. (only required if using a buffer)obj.contentType
: The file's content type. (only required if using a buffer)cb
: Callback function to display the upload progress in the form of got's uploadProgress event.
Get thumbnail of file
file
File ID for thumbnail:
All provided functions return a Promise. If an error occurs, the module rejects the Promise using an Error
object containing short informational message.
Please report any bugs or issues to the issues section.
Contributors welcome!
Please fork this repository, open a pull request and drop me a line on twitter.
getSplashImage()
. This was released in v2.1.0.node-openload
with Electron. This was released in v2.1.1.I am not affiliated with Openload and/or its owners in any way. This source code is the result of my very own interests and is either written by me and/or any contributor listed in the contributors section. Therefore I am not liable for any content users of this source code are processing in any way.
If you feel there is something wrong with this repository or the source code it contains, please open up a new issue.
MIT
node-openload
with Electron. Credits: @SrPatinhas.v1.0.0
, now also supporting buffers as upload content type. Added deleteFile()
. Dropped request in favor of got. Added tests using mocha.FAQs
An openload.co API handler
The npm package node-openload receives a total of 0 weekly downloads. As such, node-openload popularity was classified as not popular.
We found that node-openload 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.