React Native
React Native
Yousign: Download File to Memory
See more Yousign Examples
Downloads a previously uploaded Yousign file (PDF) to memory.Chilkat React Native Downloads
import { BinData, Http } from '@chilkat/react-native'
async function chilkatExample() {
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
const http = new Http();
// Adds the "Authorization: Bearer YOUR_API_KEY" header.
http.authToken = 'YOUR_API_KEY';
const downloadUrl = 'https://staging-api.yousign.com/files/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/download?alt=media';
const pdfData = new BinData();
try {
await http.downloadBdAsync(downloadUrl, pdfData);
} catch {
console.log(http.lastErrorText);
return;
}
// Your application may now access the data contained in "pdfData".
console.log('Success');
}