Referring to this post:
Picture download from url via lotus script
what i have to do change if i want to download a file (.csv or .xlsx) from an url ?
You have to change nothing. The code behind the link works for all sorts of files. I just named the method "getImage...()" because the topic of original question was about downloading images.
Related
Am using D365 Powerautomate to generate Sharepoint history (document change history) urls , i can able to generate like below , but the problem is it is downloading the file instead i want to open the word document.
I have tried web=1 in the querystring, but no luck.
https://SITEURL/_vti_history/VERSIONID/LISTNAME/ROOTFOLDER/DOCNAME.docx
Url is perfect and downloading the right document , but i want to open in browser instead of download
please use ?web=1 at the end of link, like this
https://SITEURL/_vti_history/VERSIONID/LISTNAME/ROOTFOLDER/DOCNAME.docx?web=1
We have some code which downloads a PDF file from Google Drive using the Drive API, after that we use the file to build a new envelope and send it to the customer.
Using the same file, some of these requests work, and some come back with an error "PDF_VALIDATION_FAILED".
I have the log(file) file which contains the base64 of the file and the request information, using an external tool to convert the base64 to PDF it seems to be valid and also I tried to open the file using Adobe acrobat and the document appears fine.
Is there any documentation on what makes a pdf invalid?
Thanks in Advance
If you can upload the file to a DocuSign envelope using the DocuSign web app, but it doesn't work when you use the API:
If the file type is not pdf then include the file extension in the name attribute. Eg contract.docx. The fileExtension attribute is somethimes not used by the platform.
You have a problem with your Base64 encoding method. Modify one of the DocuSign code examples to send your file and it will work.
how to read a pdf file using nodejs ?
I have two issues:
1)I have a pdf file and i just want to read it and and display the contents in the browser.
2)Read and display the content of a specific page of file
If you want node to display a PDF file to a browser, you can simply have node send the PDF file upon HTTP request: res.sendFile('./example/file.pdf');
This previously answered question has more options and further details for sending PDF to the browser.
If you are trying to read (parse) the contents of the PDF, you can use pdf2json to figure out what part of the PDF file you want to display.
I need some enlightenment in using Xpages and Lotusscript.
I have an export button in Xpages, that takes the ID as parameter sends it to Lotus script agent, which than uses that id to fetch data from web service and exports it to .csv.
The agent was tested and is working.
And when i run the Xpages in notes and try to export data it's working, the file is shown in folder that is designed to.
But when the Xpage is running from the browser (chrome, mozilla) and export is pushed nothing happens.
Do i have to use some other way to export data??
Can you give me some explanation how to export data from browsers
I can recommend the POI4XPages project on OpenNTF. Export of views made easy
Where are you testing the agent and where are you looking for the file?
When XPages runs from a browser, all that can ever run on the browser is client-side JavaScript. Any of your back-end code (SSJS etc) runs on the server, the LotusScript agent will also run on the server. So if the LotusScript agent is creating and saving a CSV file to a folder, it will save it to that folder on the server.
Exports running from a browser will typically return HTML or other content that the PC can interpret as needing to be opened in a certain program, e.g. Excel. But you would need to save the code in a Notes Document, then access the document and print the result back to the browser.
There are open source projects like OpenCSV that have Java libraries for outputting a stream of CSV data for a browser. (It's not Apache-licensed, so can't be put on OpenNTF under the Apache license.)
Easiest tweak is to redirect agent's output to "console" - so instead of printing to file (Open File, then Print #1 for example) use ordinary Prints. Also add content-type header.
In XPages you can specify agent's url (http(s)://server/path to nsf/agent?OpenAgent) and browser will get agent's response - what is exactly your CSV. It downloads and opens in Excel, usually.
Make sure to change the security setting of your agent to "Run As a Web User". Otherwise, this agent will not run.
I have an image that is stored within a document in the database.
the following url will open the image from the web client in the image control
/file/winter/$file/winter.jpg
but it doesn't work from the notes client.
How should I change the url to get it to work in the Notes client?
Your image is actually an attachment. You need the /xsp approach:
http(s)://[yourserver]/[application.nsf] /xsp/.ibmmodres/domino/OpenAttachment/ [application.nsf]/[UNID|/$File/[AttachmentName]?Open
Check the full details. Most likely you can skip the server and application part