libURL and New TsNet Commands/Failures

Sannyasin Brahmanathaswami brahma at hindu.org
Mon Aug 1 15:48:39 EDT 2016


OK since

a)  "libURLftpUploadFile"  has no hook to/support from, tsNet for schema "sftp://"

AND

b) I hit the "no business license" wall on attempt to use "tsNetUploadFileSync"

I regressed back to "put" 

We are uploading small web optimized files in this use case so reading in the data before "put" is not a big issue time wise and upside is: very easy to write:

on mouseUp
   put initializeConnectionDetails() into tStem
# the above generates the full absolute sftp:// user path to the target directory
# based on UI fields
   put fld "remoteTarget" after tStem
   answer folder "Choose a folder to upload"
   put it into tSourceFolder
   put files (tSourceFolder) into tFilesToUpload
   
   repeat for each line x in tFilesToUpload
      put x into tFileForWeb
      replace space with "_" in tFileForWeb 
      # path to local
      put tSourceFolder & "/" & x into tFileToUpload
      # path on remote
      put tStem& "transferTests/" & tFileForWeb into tRemoteFile
      put url ("binfile:/" & tFileToUpload) into url( tRemoteFile)
   end repeat
end mouseUp

This meets our requirements for now… if there is any heavy lifting to do it is usually by those who have enough expertise and login permissions to use their FTP clients.. no reason to re-invent that.   For this "little sister blogger" use case … "put" with SFTP will serve.

BR


On 8/1/16, 8:53 AM, brahma at hindu.org> wrote:

    I (indy licensed user) did my best to implement tsNetUploadFileSync (see my code belowl ast post on this)
    
    but got this as an error message:
    
    executing at 8:50:14 AM
    Type	external: unlicensed
    Object	Upload A File with tsNet
    Line	
    Hint	tsNet



More information about the use-livecode mailing list