Quantcast

tsNet docs?

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

tsNet docs?

prothero--- via use-livecode
I finally got around to playing with tsNet, but I can't find docs, just
sparse Dict entries.

I'd like to test uploading a file via SFTP and also FTPS, synchronous
preferred in this case.

After hunting around via Google I manage to turn up this stack from a
blog post:
<https://downloads.techstrategies.com.au/tsnet/sample_sync_stack.livecode>

But when I run a modified version of the "SFTP Upload example" button I
get an error complaining about it being unlicensed.

I'm using Indy, and I believe synchonrous upload vis SFTP is supported
with Indy, no?

Anyone here have a concise example of synchronous uploading via tsNet?

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: tsNet docs?

prothero--- via use-livecode
Hi Richard,

Firstly my apologies on the lack of documentation, it is definitely on
my todo list and I am working on some Livecode lessons for tsNet at the
moment.

I have just double checked that stack and noticed that the call to
tsNetUploadSync is using the wrong syntax (it changed at one point)
which could be causing you issues.

An updated version is now available at that same URL with the corrected
the syntax for that call and another button so that there are now
examples for both uploading via SFTP and FTPS.

These should work correctly on Indy and I have confirmed that here.  Are
you by any chance trying to use the tsNetUploadFileSync command instead
of tsNetUploadSync?

If so, these are only supported in the business edition if you are
trying to use SFTP.

Regards,

Charles


On 2/04/2017 10:54 AM, Richard Gaskin via use-livecode wrote:

> I finally got around to playing with tsNet, but I can't find docs,
> just sparse Dict entries.
>
> I'd like to test uploading a file via SFTP and also FTPS, synchronous
> preferred in this case.
>
> After hunting around via Google I manage to turn up this stack from a
> blog post:
> <https://downloads.techstrategies.com.au/tsnet/sample_sync_stack.livecode>
>
>
> But when I run a modified version of the "SFTP Upload example" button
> I get an error complaining about it being unlicensed.
>
> I'm using Indy, and I believe synchonrous upload vis SFTP is supported
> with Indy, no?
>
> Anyone here have a concise example of synchronous uploading via tsNet?
>


_______________________________________________
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
|  
Report Content as Inappropriate

Re: tsNet docs?

prothero--- via use-livecode
Charles Warwick wrote:

 > Firstly my apologies on the lack of documentation, it is definitely
 > on my todo list and I am working on some Livecode lessons for tsNet
 > at the moment.

Looking forward to them - thanks.


 > I have just double checked that stack and noticed that the call to
 > tsNetUploadSync is using the wrong syntax (it changed at one point)
 > which could be causing you issues.
 >
 > An updated version is now available at that same URL with the
 > corrected the syntax for that call and another button so that there
 > are now examples for both uploading via SFTP and FTPS.
 >
 > These should work correctly on Indy and I have confirmed that here.

Thanks.  I'm no longer getting the license error with either FTPS or
SFTP, and indeed I was able to upload a file with FTPS so that much is good.

With SFTP, however, I'm getting weird results, something I've never seen
before, like LC is in some sort of semi-hung state.

I fill in the relevant fields, click "SFTP Upload Example", but then I
don't get anything in the Results field and as long as I care to wait my
CPU monitor shows LC churning up about 23%, but there's no visible
indication that anything's happening.

Hoping to explore the script to guess what might be happening, I found I
could switch tool modes and right-click on the button, but when I select
"Edit Script" in the popup button nothing happens.

At that point some things are unresponsive, others eventually become
responsive after long delays, and -- weirdest of all - after I quit C
it's still shown as a process in my process list.

This is on Ubuntu 14.04, with LC v9 DP6.

Any other info I can provide?  Should I file a formal bug report on this?

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: tsNet docs?

prothero--- via use-livecode
Hi Richard,

I think I am noticing a potentially related bug when an invalid path is
used in the SFTP transfer - I am looking into it now.

Can you confirm that you are using the complete path for the destination
path in the URL?  Unlike FTP, SFTP paths are not relative to the user's
home directory.

For example, if a user's home directory is /home/bob and you want to
upload a file "test.txt" to the /home/bob/uploaddir/ directory, the URL
would need to look something like this:

sftp://my.sftp.server.host/home/bob/uploaddir/test.txt

Please file a bug report and I will get an updated version out for you
to test and see if we can confirm this is the same issue.

Cheers,

Charles


On 3/04/2017 8:23 AM, Richard Gaskin via use-livecode wrote:

> Charles Warwick wrote:
>
> > Firstly my apologies on the lack of documentation, it is definitely
> > on my todo list and I am working on some Livecode lessons for tsNet
> > at the moment.
>
> Looking forward to them - thanks.
>
>
> > I have just double checked that stack and noticed that the call to
> > tsNetUploadSync is using the wrong syntax (it changed at one point)
> > which could be causing you issues.
> >
> > An updated version is now available at that same URL with the
> > corrected the syntax for that call and another button so that there
> > are now examples for both uploading via SFTP and FTPS.
> >
> > These should work correctly on Indy and I have confirmed that here.
>
> Thanks.  I'm no longer getting the license error with either FTPS or
> SFTP, and indeed I was able to upload a file with FTPS so that much is
> good.
>
> With SFTP, however, I'm getting weird results, something I've never
> seen before, like LC is in some sort of semi-hung state.
>
> I fill in the relevant fields, click "SFTP Upload Example", but then I
> don't get anything in the Results field and as long as I care to wait
> my CPU monitor shows LC churning up about 23%, but there's no visible
> indication that anything's happening.
>
> Hoping to explore the script to guess what might be happening, I found
> I could switch tool modes and right-click on the button, but when I
> select "Edit Script" in the popup button nothing happens.
>
> At that point some things are unresponsive, others eventually become
> responsive after long delays, and -- weirdest of all - after I quit C
> it's still shown as a process in my process list.
>
> This is on Ubuntu 14.04, with LC v9 DP6.
>
> Any other info I can provide?  Should I file a formal bug report on this?
>


_______________________________________________
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
|  
Report Content as Inappropriate

Re: tsNet docs?

prothero--- via use-livecode
Charles Warwick wrote:

 > Hi Richard,
 >
 > I think I am noticing a potentially related bug when an invalid path
 > is used in the SFTP transfer - I am looking into it now.
 >
 > Can you confirm that you are using the complete path for the
 > destination path in the URL?  Unlike FTP, SFTP paths are not relative
 > to the user's home directory.

I would love to, but back on my main machine here this morning I
downloaded a fresh copy of the sample stack from the URL I'd used before:
<https://downloads.techstrategies.com.au/tsnet/sample_sync_stack.livecode>

...and I'm back to the "Unlicensed" error. :(

I'm running LC v9dp76 Indy on Ubuntu 14.04.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: tsNet docs?

prothero--- via use-livecode
Hello Charles -

Since I wrote my earlier post v8.1.4rc1 has been released, so I tried
there with better results for some things, and noted all of my findings
with both v9 and v8.1.4 for both SFTP and FTPS here:
http://quality.livecode.com/show_bug.cgi?id=19525

Question:  libURL has a VERY convenient feature in which if you're
uploading to a path that includes a folder that doesn't yet exist, it'll
create that folder for you.

If tsNet doesn't provide that, is there any better method for doing that
than obtaining a list of directories for even folder level and
explicitly creating one if not found?

I can write code for that, and probably cache results as I go to
minimize the number of times I need to do that, but it would sure be
more convenient to discover that there's some means of getting that
libURL convenience in tsNet.

Thanks -

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com


Earlier I wrote:
 > Charles Warwick wrote:
 >
 >  > Hi Richard,
 >  >
 >  > I think I am noticing a potentially related bug when an invalid
 >  > path is used in the SFTP transfer - I am looking into it now.
 >  >
 >  > Can you confirm that you are using the complete path for the
 >  > destination path in the URL?  Unlike FTP, SFTP paths are not
 >  > relative to the user's home directory.
 >
 > I would love to, but back on my main machine here this morning I
 > downloaded a fresh copy of the sample stack from the URL I'd used before:
 >
<https://downloads.techstrategies.com.au/tsnet/sample_sync_stack.livecode>
 >
 > ...and I'm back to the "Unlicensed" error. :(
 >
 > I'm running LC v9dp76 Indy on Ubuntu 14.04.
 >
 > --
 >   Richard Gaskin



_______________________________________________
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
|  
Report Content as Inappropriate

Re: tsNet docs?

prothero--- via use-livecode
I have a need to allow a user to select the folder they want to save filled form to. I want the default to be ~/Documents/Installs but of course that folder may not be created yet. So what I do is I create the folder before popping the selection dialog, then if the user selects another folder, I delete the temporary one.

It's ugly, but it works.

Bob S


On Apr 4, 2017, at 10:28 , Richard Gaskin via use-livecode <[hidden email]<mailto:[hidden email]>> wrote:

Hello Charles -

Since I wrote my earlier post v8.1.4rc1 has been released, so I tried there with better results for some things, and noted all of my findings with both v9 and v8.1.4 for both SFTP and FTPS here:
http://quality.livecode.com/show_bug.cgi?id=19525

Question:  libURL has a VERY convenient feature in which if you're uploading to a path that includes a folder that doesn't yet exist, it'll create that folder for you.

If tsNet doesn't provide that, is there any better method for doing that than obtaining a list of directories for even folder level and explicitly creating one if not found?

I can write code for that, and probably cache results as I go to minimize the number of times I need to do that, but it would sure be more convenient to discover that there's some means of getting that libURL convenience in tsNet.

Thanks -

--
Richard Gaskin

_______________________________________________
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
|  
Report Content as Inappropriate

Re: tsNet docs?

prothero--- via use-livecode
Bob Sneidar wrote:

 > On Apr 4, 2017, at 10:28 , Richard Gaskin wrote:
...
 >> Question:  libURL has a VERY convenient feature in which if you're
 >> uploading to a path that includes a folder that doesn't yet exist,
 >> it'll create that folder for you.
 >>
 >> If tsNet doesn't provide that, is there any better method for doing
 >> that than obtaining a list of directories for even folder level and
 >> explicitly creating one if not found?
...
 > I have a need to allow a user to select the folder they want to save
 > filled form to. I want the default to be ~/Documents/Installs but of
 > course that folder may not be created yet. So what I do is I create
 > the folder before popping the selection dialog, then if the user
 > selects another folder, I delete the temporary one.

Easy enough to do locally, but in this case I need to do it on a server,
and via FTP commands.

And worse, I may need to do it hundreds of times.

I can get the list of folders in a server directly via tsNet's function
for that, and can use the relevant FTP commands to create folders in the
path I need as I go.

But beyond the time it would add to write all that stuff I've become
accustomed just having happen automatically with libURL, I'm also
concerned about the additional time required for all those multiple
calls to the server to make those directories so that I can eventually
get back to just uploading files into them.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: tsNet docs?

prothero--- via use-livecode
In reply to this post by prothero--- via use-livecode
Hi Richard,

Thanks for the bug report, I'll check that out soon.

Just briefly though, tsNet also provides the feature to automatically create missing directories when uploading a file.  If you look in the dictionary for the tsNet commands, you should be able to see a command to turned that feature off if you wish to.

Thanks,
   
Charles

-- Sent from my iPhone

On 5 Apr 2017 at 03:28:19 AEST, Richard Gaskin via use-livecode <[hidden email]> wrote:
   
Hello Charles -

Since I wrote my earlier post v8.1.4rc1 has been released, so I tried there with better results for some things, and noted all of my findings with both v9 and v8.1.4 for both SFTP and FTPS here:
http://quality.livecode.com/show_bug.cgi?id=19525

Question:  libURL has a VERY convenient feature in which if you're uploading to a path that includes a folder that doesn't yet exist, it'll create that folder for you.

If tsNet doesn't provide that, is there any better method for doing that than obtaining a list of directories for even folder level and explicitly creating one if not found?

I can write code for that, and probably cache results as I go to minimize the number of times I need to do that, but it would sure be more convenient to discover that there's some means of getting that libURL convenience in tsNet.

Thanks -

--   Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com


Earlier I wrote:
 > Charles Warwick wrote:
 >
 >  > Hi Richard,
 >  >
 >  > I think I am noticing a potentially related bug when an invalid
 >  > path is used in the SFTP transfer - I am looking into it now.
 >  >
 >  > Can you confirm that you are using the complete path for the
 >  > destination path in the URL?  Unlike FTP, SFTP paths are not
 >  > relative to the user's home directory.
 >
 > I would love to, but back on my main machine here this morning I
 > downloaded a fresh copy of the sample stack from the URL I'd used before:
 > <https://downloads.techstrategies.com.au/tsnet/sample_sync_stack.livecode>
 >
 > ...and I'm back to the "Unlicensed" error. :(
 >
 > I'm running LC v9dp76 Indy on Ubuntu 14.04.
 >
 > --
 >   Richard Gaskin



_______________________________________________
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


_______________________________________________
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
|  
Report Content as Inappropriate

Re: tsNet docs?

prothero--- via use-livecode
In reply to this post by prothero--- via use-livecode
Charles wrote:

 > Just briefly though, tsNet also provides the feature to automatically
 > create missing directories when uploading a file.  If you look in the
 > dictionary for the tsNet commands, you should be able to see a
 > command to turned that feature off if you wish to.

Thanks - found it:  tsNetCreateMissingDirs

Unfortunately, even after setting that to true if I use a path that
includes folders that don't yet exist it hangs. :(



--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: tsNet docs?

prothero--- via use-livecode
Hi Richard,

Do you only experience these hangs when you try to upload to folders that don't exist?

I have identified a bug related to that which should be fixed in the next version.

Thanks,
   
Charles

On 5 Apr 2017 at 06:50:29 AEST, Richard Gaskin via use-livecode <[hidden email]> wrote:
   
Charles wrote:

 > Just briefly though, tsNet also provides the feature to automatically
 > create missing directories when uploading a file.  If you look in the
 > dictionary for the tsNet commands, you should be able to see a
 > command to turned that feature off if you wish to.

Thanks - found it:  tsNetCreateMissingDirs

Unfortunately, even after setting that to true if I use a path that includes folders that don't yet exist it hangs. :(



--   Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.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


_______________________________________________
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
|  
Report Content as Inappropriate

Re: tsNet docs?

prothero--- via use-livecode
In reply to this post by prothero--- via use-livecode
Charles Warwick wrote:

 > Hi Richard,
 >
 > Do you only experience these hangs when you try to upload to folders
 > that don't exist?

With SFTP, yes.

With FTPS I'm now seeing an error 64: "Requested SSL level failed
returned from server", with or without an existing path.


 > I have identified a bug related to that which should be fixed in the
 > next version.

Excellent. Thanks.  Looking forward to that build.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: tsNet docs?

prothero--- via use-livecode
Hi Richard,

Are you using ftp:// or ftps:// at the start of the URL?  It should be ftp:// even for FTPS connections.

Thanks,
   
Charles

-- Sent from my iPhone

On 5 Apr 2017 at 08:20:05 AEST, Richard Gaskin via use-livecode <[hidden email]> wrote:
   
Charles Warwick wrote:

 > Hi Richard,
 >
 > Do you only experience these hangs when you try to upload to folders
 > that don't exist?

With SFTP, yes.

With FTPS I'm now seeing an error 64: "Requested SSL level failed returned from server", with or without an existing path.


 > I have identified a bug related to that which should be fixed in the
 > next version.

Excellent. Thanks.  Looking forward to that build.

--   Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.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


_______________________________________________
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
|  
Report Content as Inappropriate

Re: tsNet docs?

prothero--- via use-livecode
In reply to this post by prothero--- via use-livecode
Charles Warwick wrote:

 > Hi Richard,
 >
 > Are you using ftp:// or ftps:// at the start of the URL?  It should
 > be ftp:// even for FTPS connections.

Thanks, Charles.  Following the example you provided there, I had indeed
left it as "ftp://"

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.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
Loading...