Quantcast
Channel: LiveCode Forums
Viewing all articles
Browse latest Browse all 674

Android Deployment • File Transfer Error

$
0
0
Hi Guys!!

I am having trouble getting a file transfer to occur. I have been going around in circles trying to get this to work but it is giving me lots of dramas!

My Client code is:

CODE:

global WSITEon openStack   put "192.168.1.2:12345" into WSITE                  open socket to WSITE with message "DONEA"end openStackon DONEA theIP   put "C:\users\user\documents\FILE.tmp" into tFile   put URL ("binfile:" & tFile) into temp["data"]   set itemdel to "/"   put the last item of tFile into temp["name"]   put base64encode(arrayencode(temp)) into tAll   write tAll & "file§" to socket theIP   read from socket theIP with message "MESSAGES1"end DONEAon MESSAGES1 theIP theMessage      read from socket theIP with message "MESSAGES1"end MESSAGES1
And my server code is:

CODE:

on openStack   accept connections on port 12345 with message "CONNECT"end openStackon CONNECT theIP    read from socket theIP with message "NEWMESSAGE"   end CONNECTon NEWMESSAGE theIP pmsg   if char -5 to -1 of pmsg is "file§" then      delete  char -5 to -1 of pmsg      put arraydecode(base64decode(pmsg)) into temp      put "C:/USERS/ADMIN/Documents/RECEIVE.tmp" into tName      put temp["data"] into URL ("binfile:" & tName)    end if      read from socket theIP with message "NEWMESSAGE"   end NEWMESSAGE
I have been banging my head against the wall with this!!!

Any and all replies/suggestions will be greatly received!!

Googie.

Statistics: Posted by Googie85 — Sun Aug 18, 2024 9:30 am



Viewing all articles
Browse latest Browse all 674

Trending Articles