Platform is iOS. I've created a new stack to reduce unknowns, with the single button which is meant to do the following:
1) Capture image using rear camera - works
2) Export this image to file - works
Code: Select all
put specialFolderPath("documents") & "/new_large.png" into tFile1
export the last img to file tFile1 as PNG
Code: Select all
put "x" into sUsername
put "x" into sPassword
put "0.0.0.0/x/x" into sHost
put "78" & "_large" into sName
put urlEncode(sUsername) into sUsername
put urlEncode(sPassword) into sPassword
put urlEncode(sHost) into sHost
put urlEncode(sName) into sName
Code: Select all
put specialFolderPath("documents") & "/new_large.png" into tFile1
put specialFolderPath("documents") & "/"&sName&".png" into tFile2
if there is a file tFile1 then
rename tFile1 to tFile2
Code: Select all
put "ftp://"&sUsername&":"&sPassword&"@"&sHost & slash &sName &".png" into urlName
put url ("binfile:" & tFile2) into tExport
put tExport into url (urlName)
if the result is not empty then
answer "URL put failed: " & the result
else
answer "Success!"
end if
Any idea? I've used the exact same script on the desktop version of Livecode and it renames and uploads the file correctly to the FTP.