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

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 508
Joined: Sun Dec 18, 2011 7:23 pm
Location: London
Contact:

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

Post by kaveh1000 » Sun Aug 11, 2019 2:08 pm

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.
Attachments
get remote stack.zip
(896 Bytes) Downloaded 193 times
Kaveh

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

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

Post by bogs » Sun Aug 11, 2019 3:21 pm

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.
Image

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7230
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

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

Post by jacque » Sun Aug 11, 2019 4:55 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 508
Joined: Sun Dec 18, 2011 7:23 pm
Location: London
Contact:

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

Post by kaveh1000 » Sun Aug 11, 2019 5:04 pm

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?
Kaveh

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

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

Post by bogs » Sun Aug 11, 2019 5:10 pm

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/
Image

kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 508
Joined: Sun Dec 18, 2011 7:23 pm
Location: London
Contact:

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

Post by kaveh1000 » Mon Aug 12, 2019 8:02 am

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...
Attachments
get remote stack.zip
(871 Bytes) Downloaded 207 times
Kaveh

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

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

Post by bogs » Mon Aug 12, 2019 11:43 am

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!
Image

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7230
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

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

Post by jacque » Mon Aug 12, 2019 4:58 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

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

Post by bogs » Mon Aug 12, 2019 10:08 pm

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:
Image

Post Reply

Return to “Talking LiveCode”