trouble with save file per ftp

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Kruemel
Posts: 6
Joined: Thu Jan 17, 2019 11:39 am

trouble with save file per ftp

Post by Kruemel » Thu Jan 17, 2019 11:53 am

I wrote a very simple script to save only a few characters in a TXT file on an FTP server. This also works in Livecode and Windows but not on Android. When I start the app the content of the file will be deleted on the server. If I write something to the file with Windows when the app is running, I can also read it out. When I save, there is no error message, but only a file ".pureftpd-upload.5c3b5c3c.15.35ec.xxxxxxx is written to the server.
My System: Win 10, Livecode Community
I've tried with Android 4.1, 6.0, 8.0
Image
Image

if someone wants to try:
Speichern_Test.rar
(1.62 KiB) Downloaded 249 times

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7214
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: trouble with save file per ftp

Post by jacque » Thu Jan 17, 2019 6:40 pm

An explanation here:
https://my.ultrawebhosting.com/knowledg ... -file.html

It sounds like the server isn't renaming the file, but I'm not sure why. Perhaps the upload isn't complete?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: trouble with save file per ftp

Post by FourthWorld » Thu Jan 17, 2019 9:06 pm

FTP can be a good choice if you are the only user of this app (and assuming you're actually using SFTP or FTPS so you're not exposing passwords to anyone sniffing traffic).

If this app will be deployed for others to use you'll have better performance and much better security adding an HTTP API on the server, sending the data via POST.

As we learn more about the specifics of your app we can provide better guidance on how to proceed.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Kruemel
Posts: 6
Joined: Thu Jan 17, 2019 11:39 am

Re: trouble with save file per ftp

Post by Kruemel » Fri Jan 18, 2019 10:33 am

I am a carpenter and my plan is to take photos from the construction and save the work to be done and the address so that my guys can access it later when they work there and possibly add corrections and the consumed material.
I didn't have still now anything to do export with my small livecode projects and so this was my first simple attempt.
I don't know anything about php to create a page for post. I have to deal with it first.

But still it should work with livecode to save via ftp. I have tried it on 2 servers, with different phones and versions.
Sorry for a funny english, that's not one of my strengths either :cry:

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: trouble with save file per ftp

Post by FourthWorld » Fri Jan 18, 2019 12:03 pm

Kruemel wrote:
Fri Jan 18, 2019 10:33 am
I am a carpenter and my plan is to take photos from the construction and save the work to be done and the address so that my guys can access it later when they work there and possibly add corrections and the consumed material.
I didn't have still now anything to do export with my small livecode projects and so this was my first simple attempt.
I don't know anything about php to create a page for post. I have to deal with it first.

But still it should work with livecode to save via ftp. I have tried it on 2 servers, with different phones and versions.
Sorry for a funny english, that's not one of my strengths either :cry:
One of the great things about American English is that nearly anyone in the world can sound more sensible with it than most Americans. :)

Yes, FTP is doable, but there are security risks when using it in apps distributed to others. At a minimum use SFTP or FTPS so at least the password will be encrypted in transit.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “Internet”