File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
UsesCases/Attachments/get Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 77// 7. Perform some action after successful retrieving attachmwent file name using getDownloadDocumentAttachmentByIndex() function
88// 8. Save response body to local file name
99// All values of variables starting with "YOUR_****" should be replaced by real user values
10-
11- import credentials from "../../../../Credentials/credentials.json" with { type : "json" } ; // json-file in this format: { "id": "*****", "key": "*******" }
12- import fs from "node:fs/promises" ;
13- import path from "node:path" ;
14- import { PdfApi } from "../../../src/api/api.js" ;
10+ import credentials from "./credentials.json" with { type : "json" } ;
11+ import fs from 'node:fs/promises' ;
12+ import path from 'node:path' ;
13+ import { PdfApi } from "asposepdfcloud" ;
1514
1615const configParams = {
1716 LOCAL_FOLDER : "C:\\Samples\\" ,
1817 PDF_DOCUMENT_NAME : "sample_file_with_attachment.pdf" ,
1918 LOCAL_RESULT_DOCUMENT_NAME : "output_sample.pdf" ,
20- ATTACHMENT_PATH : "" ,
19+ ATTACHMENT_PATH : "" , // filed will be setting by using attachments.list[0].links[0].href after call getDocumentAttachments() function
2120} ;
2221
2322const pdfApi = new PdfApi ( credentials . id , credentials . key ) ;
@@ -76,4 +75,4 @@ async function main() {
7675 }
7776}
7877
79- main ( ) ;
78+ main ( ) ;
You can’t perform that action at this time.
0 commit comments