Page 1 of 1

Can't use "go stack url" with Google Drive

Posted: Sun Aug 11, 2019 2:08 pm
by kaveh1000
I am trying to open a remote Stack that is on my Google Drive, shared for anyone to download. The url is

https://drive.google.com/open?id=1vvFOm ... p=drive_fs

I get no error, but the stack does not open. Any ideas pls?

Attached is the simple stack.

Re: Can't use "go stack url" with Google Drive

Posted: Sun Aug 11, 2019 3:21 pm
by bogs
The problem is you would have to
* know the actual URL for the file itself (the url you have in this thread is to G-drives view page)
If the file were hosted on a plain server, for instance, you could link directly to it, which is what 'go stack url()' needs.
Or ...
* know the api to post what the download button on the page does (no idea how you would implement that)
or ...
* something else to work around that view page.
kaveh1000 wrote:
Sun Aug 11, 2019 2:08 pm
I get no error, but the stack does not open. Any ideas pls?
I doubt using that address would produce an error, but it probably returns empty as the result.

Re: Can't use "go stack url" with Google Drive

Posted: Sun Aug 11, 2019 4:55 pm
by jacque
I fought with this for a long time and never did get it to work for everyone. If you search Google you'll find some suggested URL alterations but they're old and I couldn't get them to work. I think Google changed their download behavior after that suggestion was written. Only people in the access list could download even though file permissions were set to "anyone with the link." I ended up putting the file on a private server.

Re: Can't use "go stack url" with Google Drive

Posted: Sun Aug 11, 2019 5:04 pm
by kaveh1000
Phew. I'm in good company!! Do you think it will work if I put it on an open FTP site or does it have to be http?

Re: Can't use "go stack url" with Google Drive

Posted: Sun Aug 11, 2019 5:10 pm
by bogs
Depends on whether you need login info on the ftp site. If not, should make no difference, if so, you'd have to put the login info into the posting, which could be bad.

Best I could find before lunch about the google thang, https://www.labnol.org/internet/direct- ... ive/28356/

Re: Can't use "go stack url" with Google Drive [SOLVED]

Posted: Mon Aug 12, 2019 8:02 am
by kaveh1000
Hi folks. Thanks to the last post by Bogs, the issue is solved. Here is the trick.

The link that Google Drive gives me when I ask for it is this horrendously long one:

Code: Select all

https://drive.google.com/open?id=1vvFOmmPij78kQrnFCYOieZSQP095CQdO&authuser=kaveh@rivervalleytechnologies.com&usp=drive_fs
When I click on it, in the browser I see a page with a link to download my file (the stack). Now if I copy the URL of that page, I get this less frightening URL:

Code: Select all

https://drive.google.com/file/d/1vvFOmmPij78kQrnFCYOieZSQP095CQdO/view
So this is the same link but more "logical"

The File_ID of the link is the text within the final set of slashes, i.e.

Code: Select all

1vvFOmmPij78kQrnFCYOieZSQP095CQdO
All we need to do is to add

Code: Select all

https://drive.google.com/uc?export=download&id=
before that ID, and we have a direct link to the stack. Attached is the modified stack.

Thanks everyone...

Re: Can't use "go stack url" with Google Drive

Posted: Mon Aug 12, 2019 11:43 am
by bogs
Glad to hear it helped you out kaveh1000 :D

Linux - LC 8.1.2 (didn't download your other stack, launched from the message box...)
2019-08-12_06-40.png
LAUNCH!

Re: Can't use "go stack url" with Google Drive

Posted: Mon Aug 12, 2019 4:58 pm
by jacque
Cool, I'll try it. Did you test it with a person who has no permissions at all, only the link? The older method I tried worked for me but not anyone else.

Re: Can't use "go stack url" with Google Drive

Posted: Mon Aug 12, 2019 10:08 pm
by bogs
Heya Jacque, I am a tester with no credentials or permissions :D

If you want to test it from the message box, the actual format for the link (for Kaveh's file) should be this -

Code: Select all

https://drive.google.com/uc?export=download&id=1vvFOmmPij78kQrnFCYOieZSQP095CQdO
from the message box I typed -

Code: Select all

go url "https://drive.google.com/uc?export=download&id=1vvFOmmPij78kQrnFCYOieZSQP095CQdO"
and got the result you see 2 posts up.

Of course, if you want to experiment, send me a stack, I'll be happy to see if it works :D Just let me know which version of Lc to open it in, you know I always start in 6.x or lower :wink: