Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@cincel.digital/doc-convert-request
Advanced tools
HTTP client for @cincel.digital/doc-convert-plugin package
@cincel.digital/doc-convert-request is a package designed to connect with @cincel.digital/doc-convert-plugin, a Hapi plugin that converts documents to PDF. This package provides HTTP-related functionality for document conversion.
yarn add @cincel.digital/doc-convert-request
# or
npm i @cincel.digital/doc-convert-request
To use this package, you need to import the function http
from
@cincel.digital/doc-convert-request.
The http
function allows you to convert a file to PDF by sending an HTTP
POST request to the specified URL. The function takes two parameters: the URL
and the file to be converted.
import { request } from "@cincel.digital/doc-convert-request"
const upload =
const filepicker = document.getElementById("filepicker") as HTMLInputElement
filepicker.addEventListener("change", (event) => {
const file = event.target.files?.[0]
if (!file) return
request("http://example.com/convert", file)
.then((pdfFile) => {
return pdfFile
})
.catch((err) => {
console.error(err)
})
})
The downloadRawURL
function allows you to generate a download URL for a
PDF file. It takes a File object as input and returns a URL that can be used for
downloading the file.
import { request, downloadRawURL } from "@cincel.digital/doc-convert-request"
const filepicker = document.getElementById("filepicker") as HTMLInputElement
filepicker.addEventListener("change", (event) => {
const file = event.target.files?.[0]
if (!file) return
request("http://example.com/convert", file)
.then((pdfFile) => {
const downloadRawURL = downloadRawURL(pdfFile)
window.open(downloadRawURL, "_blank")
return pdfFile
})
.catch((err) => {
console.error(err)
})
})
Please note that the @cincel.digital/doc-convert-plugin plugin is required for the proper functioning of this package. Make sure to install and configure the plugin according to its documentation before using @cincel.digital/doc-convert-request.
FAQs
HTTP client for @cincel.digital/doc-convert-plugin package
We found that @cincel.digital/doc-convert-request demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.