"Downloading" a file to an online folder ? possible

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm
Location: down under

"Downloading" a file to an online folder ? possible

Post by liveme » Fri May 07, 2021 7:32 pm

HI ppl,

I'm looking for to know if an equivalent operation as the "download" of an excell file could be done to instead "route" the file to another online/cloud folder (...so as to avoid a standard Download to folder X on PC Z...)

Any clue is that is in anyway possible..;and with what tool or method ?
*The idea behind being, you don't have to stand at your PC daily to retreive that data.
- As to why "download" an excell and not transfer or link the data to the target server by API or else...is that the DB provider is old tech and does not provide any other way than to retreive the data (from an aspx page ) using a push button to get your Excel file..
. (Welcome to Jurasic Park ! :mrgreen: :mrgreen: )

Any suggestion to "automate" this as far as possible...

Thanks

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: "Downloading" a file to an online folder ? possible

Post by mwieder » Sat May 08, 2021 12:02 am

what's the code behind the pushbutton look like? Is there a direct link to the Excel file or is it doing some backend magic to download it?

liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm
Location: down under

Re: "Downloading" a file to an online folder ? possible

Post by liveme » Sat May 08, 2021 3:59 am

I got some help from a friend and found out its using :
Handlerexec.asmx

AxWald
Posts: 578
Joined: Thu Mar 06, 2014 2:57 pm

Re: "Downloading" a file to an online folder ? possible

Post by AxWald » Sat May 08, 2021 10:20 am

Hi,

guess we'd need to know:
  • What do you get with:

    Code: Select all

       get URL ("binfile:" & firstPartOfSourceURL & "Handlerexec.asmx")
    An excel file? This would be easy. Second question:
    .
  • Where should this go to? Doesn't:

    Code: Select all

       put it into URL ("binfile:" & firstPartOfTargetURL & TargetFileName)
    do the job already?
Have fun!
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!

liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm
Location: down under

Re: "Downloading" a file to an online folder ? possible

Post by liveme » Sat May 08, 2021 7:04 pm

Ok, I'm not an expert on that matter, but my friend could set some command running in the Terminal using "Curl".
including login to the website...then "activating" the download of the excell file...so actualy I didnt use LC during that first trial.
*Most Likely LC could send this command +variable but not sure if the use of "curl" along the way is needed or would using LC actualy makes it unecessary....
I would have to try now to mimic the Curl use with LC to reply to further questions...
I'll see whith a bit more time ahead.

Most likely I will try to grab the Excell file and send it to some Dropbox folder, that way I do not download it localy, never done that before
but my friend says its doable using the right commands/tool.
..so please, be patient for the answers I'm working on other part of the system right now...
:wink:
thks for the

Code: Select all

shared code 
still

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: "Downloading" a file to an online folder ? possible

Post by FourthWorld » Sat May 08, 2021 7:19 pm

Curl is a popular library to simplify using common Internet protocols like HTTP.

LiveCode has had built-in support for HTTP (and FTP) for decades in its libURL - see the get, post, and put commands.

More recently, proprietary editions of LiveCode even include curl itself, wrapped in an external called tsNet, providing a little more efficiency and some extra options useful in certain circumstances.

In short, working with server APIs can usually be done with LiveCode out of the box, no other extra components needed.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”