Confirming an FTP Upload

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Confirming an FTP Upload

Gregory Lypny
Hi everyone,

I was wondering whether anyone would be willing to share scripting tips on how to monitor and confirm the uploading of files via FTP.  I’m using the simple PUT URL form rather than the revFTP library stuff because the latter’s examples are not particularly well documented in the built-in help feature of LiveCode.


Gregory
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Confirming an FTP Upload

AcidJazz
This post was updated on .
Greg,
  Here's how I submit data using the Put URL approach...


put DataToBeSaved into URL ("ftp://username:password@ftp.sitename.com/filename.txt")
If the result is not empty then 
        answer the result &CR& "Oops!  There was a problem saving your response.  Please wait a minute and try again."
        exit mouseup
end if


You can also read back the data that you just saved...

get URL ("http://www.sitename.com/filename.txt")
    put it into tData
    answer "Your data has been stored on the server and then retrieved." & CR & "It looks like this:" &CR&CR& the last line of tData




Cheers,
   Mark
Reply | Threaded
Open this post in threaded view
|

Re: Confirming an FTP Upload

Stephen Barncard-4
You should know that the password and username are sent as plain text and
can be easily sniffed.  This is NOT secure FTP and can expose an entire
account.  Create a special FTP space for this purpose, not your website.

Secure FTP is a long-awaited feature that is still not available in
livecode except with externals.

sqb

On 6 December 2011 09:07, AcidJazz <[hidden email]> wrote:

> Greg,
>  Here's how I submit data using the Put URL approach...
>
>
> *put *DataToBeSaved into URL
> ("ftp://username:[hidden email]/filename.txt")
> *If* the result is not empty *then*
>        hide field "wait"
>        answer the result &CR& "Oops!  There was a problem saving your
> response.  Please wait a minute and try again."
>        *exit* mouseup
> *end* if
>
>
> You can also read back the data that you just saved...
>
> *get *URL ("http://www.sitename.com/filename.txt")
>    *put *it into tData
>    *answer *"Your data has been stored on the server and then retrieved." &
> CR & "It looks like this:" &CR&CR& the last line of tData
>
>
>
>
> Cheers,
>   Mark
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Confirming-an-FTP-Upload-tp4164699p4165561.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



--



Stephen Barncard
San Francisco Ca. USA

more about sqb  <http://www.google.com/profiles/sbarncar>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Confirming an FTP Upload

Gregory Lypny
In reply to this post by Gregory Lypny
Hi Mark,

Much appreciated!  Just the kind of thing I was looking for.

Regards,

Gregory


On Tue, Dec 6, 2011, at 1:00 PM, [hidden email] wrote:

> Greg,
>  Here's how I submit data using the Put URL approach...

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Confirming an FTP Upload

AcidJazz
This post was updated on .
In reply to this post by Stephen Barncard-4
Stephen,

That's true, and I probably should have mentioned that.  For my purposes, it's irrelevant, because my research data (indeed the entire "site") is all just a bunch of meaningless numbers that nobody would have any interest in.   But for the rest of you out in the real world, caveat emptor.

By the way, Gregory, to actually send a file, you might try this:

on mouseUp
   answer file "Please choose a file to get:"
   get URL ("file:" & it)
   put it into URL ("address goes here")
   if the result is not empty then
      answer "oops"
      exit mouseup
   end if
end mouseUp
Reply | Threaded
Open this post in threaded view
|

Re: Confirming an FTP Upload

AcidJazz
Actually, Stephen, could you elaborate on the "special ftp space" that is not the website.   I'm a little unclear on the distinction.

Mark
Reply | Threaded
Open this post in threaded view
|

Re: Confirming an FTP Upload

Stephen Barncard-4
Just a method to get the uploads (and exposed password/user) to a place
that isn't your public website.  Most web providers will allow unlimited or
many FTP accounts, and you can use completely different user/passwords.
 Some providers (not On-Rev) will allow an account to have multiple users
that can own websites and/or ftp sites.  Then I give that site a sub-domain
name and use that for uploads.

There are also ways to do uploads safely that involve using server-side PHP
or Livecode solutions which have been discussed here before.   Many
examples abound for that.



On 6 December 2011 10:30, AcidJazz <[hidden email]> wrote:

> Actually, Stephen, could you elaborate on the "special ftp space" that is
> not
> the website.   I'm a little unclear on the distinction.
>
> Mark
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Confirming-an-FTP-Upload-tp4164699p4165858.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



--



Stephen Barncard
San Francisco Ca. USA

more about sqb  <http://www.google.com/profiles/sbarncar>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Confirming an FTP Upload

Gregory Lypny
In reply to this post by Gregory Lypny
Hi Stephen,

Thanks for the tip.  I was aware that LiveCode does not do SFTP.  I had to get my Mac to start running regular FTP to work with it.  I am using a separate account.

Regards,

Gregory


On Wed, Dec 7, 2011, at 8:50 AM, [hidden email] wrote:

> You should know that the password and username are sent as plain text and
> can be easily sniffed.  This is NOT secure FTP and can expose an entire
> account.  Create a special FTP space for this purpose, not your website.
>
> Secure FTP is a long-awaited feature that is still not available in
> livecode except with externals.
>
> sqb

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode