Android & URLEncode & libUrlDownloadToFile

Alex Tweedly alex at tweedly.net
Fri Jul 27 20:57:51 EDT 2012


I don't have Android, so can't help with that part.

But just on principle, I wouldn't use URLs that encode my userid / 
password in a way that could reveal them and hence allow someone 
unlimited access to my site / account.

So I'd access the files by a URL more like

put 
"http://url.com/cgi-bin/get_protected_file.lc?id=ID&pw=PWD&filename=dog.jpg" 
into tPath

and write a simple LC script to check for "ID / PWD"  - but I'd make 
them different from the account / password that can be used for login 
and everything else; so if someone does snoop your URL traffic they can 
get read-only access to your protected files but can't change them, 
delete them or anything else.

-- Alex.



On 27/07/2012 06:56, Nicolas Cueto wrote:
> Hello.
>
> On the desktop, this works:
>
> put "http://ID:PWD@url.com/cgi-bin/dog.jpg" into tPath
> set the filename of image "img" to tPath
>
> On Android, it does not. Nor does this:
>
> put "http://ID:PWD@url.com/cgi-bin/dog.jpg" into tPath
> put urlEncode(tPath) into tPath
> set the filename of image "img" to tPath
>
>
> So... how do I get an Android stack to access online files that are in
> a protected directory?
>
>
>
> What I'm actually after is more complicated.  Namely, getting my
> Android stack to download jpg and mp3 files from a protected directory
> on my OnRev account into a directory other than those specified by
> specialFolderPath. But, after having tried now for many many hours,
> decided instead to break down the larger problem into smaller ones.
> For example, the scripts above.
>
>
>
> A solution to that smaller problem, or, better yet, to the overall
> larger problem, would both be appreciated.
>
>
> Thanks.
>
> --
> Nicolas Cueto
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list