我用這個鏈接,以原路段爲下載鏈接: https://milanaryal.com/2015/direct-linking-to-your-files-on-dropbox-google-drive-and-onedrive/如何使用JavaScript下載URL(Nodejs)?
現在實際上,我怎麼使用下載鏈接,下載JavaScript中的文件?我想要做的事,如:
link = 'https://drive.google.com/uc?export=download&id=FILE_ID';
let x = download(link); //now x is the download file
我看着它,它好像有與HTML/jQuery的這樣做的方法,但由於我與的NodeJS服務器端的工作,我不使用這些。我正在做這個下載的事情,因爲我想檢查文件是pdf還是文本,解析文本,然後使用Elasticsearch搜索它。