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 7
7
// 7. Perform some action after successful retrieving attachmwent file name using getDownloadDocumentAttachmentByIndex() function
8
8
// 8. Save response body to local file name
9
9
// 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" ;
15
14
16
15
const configParams = {
17
16
LOCAL_FOLDER : "C:\\Samples\\" ,
18
17
PDF_DOCUMENT_NAME : "sample_file_with_attachment.pdf" ,
19
18
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
21
20
} ;
22
21
23
22
const pdfApi = new PdfApi ( credentials . id , credentials . key ) ;
@@ -76,4 +75,4 @@ async function main() {
76
75
}
77
76
}
78
77
79
- main ( ) ;
78
+ main ( ) ;
You can’t perform that action at this time.
0 commit comments