How can I download & install ch1 file from GoogleDrive?
-
If I want to Download my .ch1 files from Google Drive or Drop Box etc and after Download it will install that .ch1 files to
C:\Users\UserName\Documents\Vendorname\PlugiName\SamplesI know it is possible with Server and FileSystemAPI but I have no example and clue to get it started. Can I get a startup snippet or an example?
I want it for both mac and windows.I have tried the Doc example... but it is not working...
Server.setBaseURL("http://hise.audio"); const var target = FileSystem.getFolder(FileSystem.Documents).getChildFile("HISE_1_1_1.exe"); Server.downloadFile("download/HISE_1_1_1.exe", {}, target, function() { var message = ""; message += Engine.doubleToString(this.data.numDownloaded / 1024.0 / 1024.0, 1); message += "MB / " + Engine.doubleToString(this.data.numTotal / 1024.0 / 1024.0, 1) + "MB"; Console.print(message); if(this.data.finished) Console.print(this.data.sucess ? "Done" : "Fail"); }); inline function onButton1Control(component, value) { if(value) Server.stopDownload("download/HISE_1_1_1.exe", {}); }; Content.getComponent("Button1").setControlCallback(onButton1Control);
I want to Download it from my Google Drive and Install on samples folder
-
@DabDab I have videos on YouTube about downloading files.
-
@d-healey I am trying from your video.. but not working.. what am I doing wrong ?
Content.makeFrontInterface(600, 600); const var Download = Content.getComponent("Download"); const url = "https://www.mediafire.com/file/8poxoikytnbyd9s/presettest.zip/file"; const downloadFolder = FileSystem.getFolder(FileSystem.Downloads); inline function onDownloadControl(component, value) { if(value) { startDownload(); } }; Content.getComponent("Download").setControlCallback(onDownloadControl); //Function inline function startDownload() { Server.setBaseURL("https://"); local f = downloadFolder.getChilFile("presettest.zip"); Server.downloadFile(url.replace("https://"), {}, f, function(){}); }
-
HiseSnippet 959.3ocsVs0aaaCElxIpaxaqXEX+.D7SJ.d9xVWWaGJlmsiGLVSpQcawdqfghJhHTjBjTwUKv.6m79GrcntXK2XjlZf4GL74xGOe7bidgRRnZsTgb7dSdJE470tKyEl3IwXl.MeJx4gtmg0FpxuT037TrVSCQNNG86VENdGiJ97O+5XLGKHzspPn2IYD5KYILyVsKF8GLNeFNj9FVRCue7n4DoXhjKy.9bj6.TJlbE9R54XqasbQNO3zPlQpVZvFpF7YrLLeYrbknz+2wzrK3TqvPzR3fJUilDy3gKpuqZDx43Eau4GUdy+N2yXgrM52lA91BC9aQzLG3z5tnzvOCJ4zfRGWRoG4tjnXolsVr74qbmKfBRDFR0MoRounVP.lHAODldI3qnyTfvFDAOYvft9vWm7Ksgrs13eMV4OE3KWhC8egeMzKolIxjTo.DB5T6PG.VEtLEGbuSrwjped+9qVspWBMjgiXJZOhLoeDiS6+zT4GjrqxMhKxCeltephpoFHUY58WrzBe5TyjvpfLSxCgFtW3OCrtLG59RrzoTcPCk0rRCrhI3LA0OJSPLLovWJpsZuQJIOfTec5B2YdF8j12z1iEETI3ARdZCVYpAF.Gq251qgq7mJqzSaMTDmIXN+BnwM3VLvl652eVECaeKJ+QA2RukT00Tk8zGi0z295WFrIgaKEdbIAy8ifb0tIuBhBsX1jUPmcS5E.qN3Mnr9AUzdJZJ21lzHLc8uYcW+ntaHZvI2rFNi0Mx0mKMzWIJ4b60s8+XSQQ60VUhgCk08Y1tePcW.CDYIWPUMKnVGgAncmJev8apjTVka3nTLWvLuJkVIWjcCK+8smgQUsI1o4JFBtZJlkeX0r73LiQJPL3PZ6VWrQE7u4hSzamOEav0mDbnPfRoJCydeblRuFVrVtkvycJUekQlV3aUyIx4KtOw8Cah4nzQ4aD9a7nUrPSLxw0IDjiorKiMVo.PhoOSl.w.q.DNsP2dwErxTFlwwlc2iZevnx.TF2Y4kcAkPyL4MeP4yX45f6b458khOxcAyPh2OGasGNB0m+O3X0SRei6oQQThYKAO1c1ednu+7IB+qkYFl3xyvFECZKbOOKYI7RLgBQWHnbss72x1jWJOvJay.KohvBg+E9TYbnU1ox3vZinDLQIeOobzv9n2WVnA3jn3MdO3Oa.x9CqGHbcGza.JAd+88Dh85+8vb29w7CG.le7.v73C.yOc.XdxAf4mO.LO8NwX+qO+VlQlTNN.JVbZwhIGmSEXnypnKD8ejSGpuO
-
@DabDab You have misspelled here:
local f = downloadFolder.getChilFile("presettest.zip");
-
-
@DabDab if you open the URL in a private browser does it download?
-
@d-healey if I do so, It is throwing an url and asks to download from a button..
-
@d-healey How can I do it by using googledrive or this kind of file hosting services?
-
@DabDab You need a direct link to the file, without that you can't do it.
-
I am running into a similar issue. I can download the .exe from the docs just fine and also the 100mb.zip mentioned in @d-healey tutorial however when trying to download from S3 I get no download at all.
I tested the url in the browser and it instantly downloads the file. I tested with curl as well which is used by HISE on Linux systems and it works fine as well.
The correct URL also shows up in theServerController
.This is my url that I am trying to download from:
https://bot-audio-sample-storage.s3.us-west-1.amazonaws.com/samples/boisterous-ammonite.wav
Is there anything I am doing wrong here?
This is the code that I am using, its quite simple.
Server.setBaseURL("https://bot-audio-sample-storage.s3.us-west-1.amazonaws.com"); const var target = FileSystem.getFolder(FileSystem.Documents).getChildFile("boisterous-ammonite.wav"); Server.downloadFile("/samples/boisterous-ammonite.wav", {}, target, function(){ Console.print(trace(this.data)); if(this.data.finished) Console.print(this.data.sucess ? "Done" : "Fail"); });
HiseSnippet 874.3ocsU0siSbCE1S1cPjPaUQpO.V4pDojIIEJTABAra1fhfcIhAP8NjWOmrwJdrGY6YCgU6KUex5aP6wyL6lDHrPSUmKhx4mO6uyudhQyAqUaHA0e6xLfD7CgwKUtYGNiITjwCIA+T3wLqCLzRUGrLiYsPBIHXuW3UDTeeRw2e8zCXRlhCqTQHuWK3vqDoB2JsSd1KER4HVB7VQ5Zde+mMlqUGpk5bjO6E1mjw3yYmAmv7tUKjDbqiRDNsI1wbfkDr+A5jkwyzKTk9+dgUbpD7BCHw3AUpdjVl3YrWK4vYBYxjqhaKAOkIqxB6UlE9kviEIhq0uJa7yEFnqPrd9Hn1lzauMn2fuF81BkBViR6WRo6FFyMhL2JKd9bmvwJr3Lkgo80oRoujZ+YsvC0nGJWTJaNLxfBWin0C52uCE+o8iazHFLmClHK3NfYg28lW0p4LmKy9nd8NU65xxSD5tVVZlD5ZwfDqKQ16Eka6t.rttChXorOoUrE1HtNsIdjXwz5nmyLTGybF3nOgNRHg3kX6TZDpnntXZslxgZddJRVaau8h7h2ZqlmpE9lPMdcrzTsR3fnEryatFySv7rTyp.zqjp1deMjcnWbYmJl0gNMWwcBspU6KZPwOLoY0RHJyHTtVNiOa4lIrQILGqMdqdmDSWoKZpPIryfj1eN1q8vl6KbzmRaNTqflzGQaNhIj9X3RebzqGcg1LWnNiJEp4d4+CUfuUB3pHlpUmncvqwPuwEMp23xFzO2zzoa0luwxnkRrDtMy9gayMArkJO8TvzAaQj4v0Nhc7aNFcquuwHdYe9ZNpUiwn80YPk7MuGfTMnf+6ciGhEL+bXkNzuLv3Dd5DLDNGWpUNUVObHXm6zY3ZsuXjEWVnSxkL2laP7qMqLf4iMFa8ilJqvsb80p+KVqz+FWq78Rw6FNQ33y1NGqsENhYp+O3X0x3eL7noSAtaEA2Obzerqad+FW+az4NbB7XlyH9HIH7j7zX78HNf2tRAR7vCCp46VJk66k8YfXPkTH723WkwAd4fJiCtxHIkwM5OvKmB7q6ucgFjSphW5piO4hxzAjhICDWX+n9jT7kmOv49vuK1.ucL+5Nf4d6.l6uCX9sc.yC1ALObGv762HF+i9OO2oSKGGPESNpXEQPvQJF1YUzER9G.hKyo5A
-
@oskarsh Your code works here. The file downloads. You are seeing a fail because there is a typo in your if statement (I think this might be in the docs?).
this.data.sucess
should bethis.data.success
-
@d-healey I restarted and HISE and its working ... intersting. It might have been stuck in a odd state. Thanks for testing!
-
@d-healey I think what might have caused this is that I am re-setting the baseURL to a different one when I am trying to download. Similar to your use case I am getting the Download URL from a server, I then re set the base url to download the samples from a different host.
Could this be causing issues? Can I reset my baseURL to the correct host every time I'll be calling another API?
-
@oskarsh The idea of the base URL is you set it once and don't change it (of course sometimes you need to).
If you are changing it a lot then set it to
https://
. Then you can use any endpoint URL you need and just remove thehttps://
from it. -
@d-healey I am trying with Google Drive link...Not working..
HISE can not download file from Google Drive as well !!
What is the solution If I want to host my large files on Google Drive etc, other than my host Wordpress? -
@DabDab Amazon S3, PCloud. Dropbox can do it but it's complicated.
-
@DanH Amazon S3 is easy with the WooCommerce plugin.
-
-
@DanH I have found Pcloud very useful and working nicely with HISE. Thank you for that. But I have one issue after 1 Download if I delete the File and Re-Download it , HISE doesn't start the Download again.. WHY?