how to download an image

Matt Maier blueback09 at gmail.com
Sun Jun 4 13:06:53 EDT 2017


Hokay, so, apparently post is a blocking command, which is a bad idea for
multiple potentially large files. So I'm trying to use this, but it's still
downloading 1kb files.

*put* "https:" & tImgUrl into tImgUrl

*set* itemdelimiter to "/"

*put* item -1 of tImgUrl into tImgName

*set* itemdelimiter to comma

*put* tNewFolder & "/" & tImgName into tNewFile

libURLDownloadToFile tImgUrl,tNewFile

On Sun, Jun 4, 2017 at 8:55 AM, Matt Maier <blueback09 at gmail.com> wrote:

> I got bubble.is to send the base64 encoded image data instead of a link.
> So just putting the base64decoded data into URL is working.
>
> On Sun, Jun 4, 2017 at 12:41 AM, Colin Holgate via use-livecode <
> use-livecode at lists.runrev.com> wrote:
>
>> Scott’s routine worked for me too. It’s worth checking where the spaces
>> and returns there are in his test, I had to edit it from the email version.
>> I also just tested in the multiline message box. For testing in a button,
>> in LiveCode 8, you have to declare the variable as well. This was the whole
>> button script:
>>
>> on mouseUp
>>
>> local theURL
>>
>> put "http://s3.amazonaws.com/appforest_uf/f1496548544475x1403871
>> 06221169240/grilled_cheese_on_plate.jpg" into theURL
>>
>> put url theURL into url ("binfile:" & specialFolderPath("desktop") &
>> "/DLimage.jpg")
>>
>> end mouseUp
>>
>>
>> _______________________________________________
>> 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