i am using integrated document server 4.4.3 ubuntu based, bellow code is customized for my suitability, how can i form a url based on key
asc_docs_api.prototype.asc_customCallback = function(typeFile, bIsDownloadEvent)
{
var actionType = c_oAscAsyncAction.DownloadAs;
var options = {downloadType : DownloadType.Download };
this._downloadAs("save", typeFile, actionType, options, function(incomeObject){
if (null != incomeObject && "save" == incomeObject["type"]) {
//incomeObject["data"] will return key of the document instead of key, i need full url of the document with md5 and expires like below
//ex: http://cache/files/.....
});
};
thank you in advance
Paste the URL of the file. Use the get method to retrieve the data from the URL pasted. Give the name and format of your choice to the file and open it in the write mode.
Download files from URL in Python. Problem statement: Write a python program to download a file using URL. Steps/Algorithm: Import the requests module. Paste the URL of the file. Use the get method to retrieve the data from the URL pasted. Give the name and format of your choice to the file and open it in the write mode.
Give the name and format of your choice to the file and open it in the write mode. Write the entire contents of the file to successfully save it. The required file from the URL will automatically get downloaded and saved in the same folder in which code was written.
Try it Yourself » The downloadattribute is only used if the hrefattribute is set. The value of the attribute will be the name of the downloaded file. There are no restrictions on allowed values, and the browser will automatically detect the correct file extension and add it to the file (.img, .pdf, .txt, .html, etc.).
You are trying to get the link too early, the file is not yet available, the conversion process might not be completed. This callback only means that the conversion task is created
But you can try using the function onDownloadAs (created for the integrators who are going to create external button downloadAs) http://api.onlyoffice.com/editors/config/events#onDownloadAs A link to the file will be sent to: asc_docs_api.prototype.processSavedFile = function(url, downloadType)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With