how to download an image
Mark Wieder
ahsoftware at sonic.net
Sun Jun 4 16:19:21 EDT 2017
I dunno. Here's what I just did and it loaded the image with no
problems. All 97,183 bytes worth. Do you have write permission to the
folder you're downloading to?
on mouseUp
local tImgUrl
local tImgName
local tNewFile
constant tNewFolder="/home/mwieder/Desktop"
put
"//s3.amazonaws.com/appforest_uf/f1496548544475x140387106221169240/grilled_cheese_on_plate.jpg"
into tImgUrl
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, "finished"
end mouseUp
on finished
answer "All Done"
end finished
--
Mark Wieder
ahsoftware at gmail.com
More information about the use-livecode
mailing list