NetTalk Central

Author Topic: Fail to upload file  (Read 8291 times)

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Fail to upload file
« on: November 05, 2014, 04:28:24 PM »
Several years ago I made procedure for upload file to FTP server in Clarion 6.
It works well. Now I am upgrading my app to Clarion 9.1 and NetTalk 8.31 (even there is 8.30 label).
It does not work. So I start digging. Cause it was made with Capesoft .TXA files (FTP_UploadFile and FTP_Files_Procedure) I tried to make one simple procedure with basic ftp commands. So I use JUMP START for FTP. This example does not work at all, same as old, once upon a time during my learning curve functional procedure.

I tried to connect to server via Windows FTP.EXE and it works with no glitch. I uploaded file with no problem.

Error that I receive is "The requested connection could not be opened. The Open command timed out or failed to connect". An error raise instantly with no delay.
One more thing, it is interesting that self._command property is empty when program reach .ErrorTrap method, so
case statement from example is out of function too.

Best regards,

Djordje Radovanovic
« Last Edit: November 06, 2014, 12:02:44 AM by Djordje Radovanovic »

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: Fail to upload file
« Reply #1 on: November 05, 2014, 04:31:58 PM »
Sorry, I meant to send this message to FTP group.

But anyway, problem is the same.

Best regards,

Djordje Radovanovic

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: Fail to upload file
« Reply #2 on: November 06, 2014, 01:23:13 AM »
I tried example from C:\Users\Public\Documents\SoftVelocity\Clarion9.1\Accessory\Capesoft\NetTalk\FTP\ABC
and even it says that "File Received Ok", I can not find new multi24.ico in that folder.

Than I reverted my NetTalk to 8,28 version. There is no this new example but there is some old examples. I tried FTP_JumpStart with with parameters from new example 8.30 for angelfire server and it done with an old example just what is meant to do. I believe there is an error in refactored FTP class.

Best regards,

Djordje Radovanovic


Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: Fail to upload file
« Reply #3 on: November 06, 2014, 01:36:06 AM »
This part of template code is invalid because %LocalPathPar does not exist. This error is in previous version too. 

           #if(%WarnOnNoFilesToUpload)
          message('No files to transfer from|' & clip(%LocalPathPar),'%Application Note')
            #endif

Best regards,

Djordje Radovanovic

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11300
    • View Profile
Re: Fail to upload file
« Reply #4 on: November 06, 2014, 02:10:26 AM »
Hi Djordje,

As you noted the FTP class has been refactored. Backwards compatibility should be high, but it's worth reading the (new) docs to see what the ideal approach is.

The control template, and hence old ftp_upload_file etc procedures have been deprecated in favor of the new procedures in the \examples\Capesoft\NetTalk\FTP\ABC procedure.

>> it says that "File Received Ok", I can not find new multi24.ico in that folder.

I believe the files are uploaded into a sub-directory - check the settings in the calling procedure, and check where it is expecting the result to go.

If you believe the new class is not working then please send me (via private email) connection details for the ftp server so I can test from here. You can also try out the Ftp Client procedure in the NetDemo app as that is a good way to test the class.

If the demos work ok, but your program does not, then you may want to consider looking at your FTP code - especially if you have hand-code - and possibly just re-doing it using the new example functions. It's a lot cleaner now than it used to be, so a lot easier to implement, and more reliable.

cheers
Bruce


Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: Fail to upload file
« Reply #5 on: November 07, 2014, 09:55:04 PM »
Hello Bruce,

I played with examples\Capesoft\NetTalk\FTP\ABC\ftpdemo.app. Tried to download file from your new and fresh FTP example with no change at all.
The only thing that I changed is after compilation I rename multi24.ico file into multi24a.ico to be sure that requested file does not exist.
Connection settings are from original example (also server settings):
  parms.pAction           =  'getremotefile'   
  parms.pRemoteFileName   =  '/multi24.ico' 
  parms.pLocalFileName    =  '.\multi24.ico'   
  parms.pHideWindow       =  false
  parms.pShowDetails      =  true
  If FtpFile(parms) = 0
    message('File Received Ok')
  Else 
    message('Error Receiving File')
  end

I assume that parms.pLocalFileName point to application folder so this is place where I am looking for downloaded file.
After calling of this procedure I receive 'File Received Ok' so I assume that procedure downloaded file but nothing new is in my application folder.
As far as I understand, this procedure is not working properly. Sorry for my ignorance but please can you point me where I am wrong.

Best regards,

Djordje Radovanovic

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11300
    • View Profile
Re: Fail to upload file
« Reply #6 on: November 08, 2014, 01:23:06 AM »
Hi Djordje,

Maybe send me your tweaked application  and the details of the ftp server you are running it against - and I can try and duplicate your problem here.

cheers
Bruce

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: Fail to upload file
« Reply #7 on: November 08, 2014, 03:10:29 AM »
Hi Bruce,

I did not tweak anything.

>>Tried to download file from your new and fresh FTP example with no change

Just removed from destination place existing destination file. To be sure that it is downloaded. Nothing else.
In your example multi24.ico is installed in examples\Capesoft\NetTalk\FTP\ABC folder, so if you not remove multi24.ico from that folder you can not be sure about download.
Server parameters are from your original example.

Best regards,

Djordje Radovanovic

« Last Edit: November 08, 2014, 10:48:24 AM by Djordje Radovanovic »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11300
    • View Profile
Re: Fail to upload file
« Reply #8 on: November 10, 2014, 12:18:38 AM »
Hi Djordje,

I just tested here with the example, and it seemed to download ok.

Bear in mind though that the server account is "open" so there may, or may not, by a multi24.ico on the server when you run the example. I recommend uploading the file then deleteing it (or renaming it) in the local dir, then downloading it again.

As I said, I tried with the example from here now, and downloading the file seemed to work well.

cheers
Bruce

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: Fail to upload file
« Reply #9 on: November 10, 2014, 03:03:16 AM »
Ok. Sorry for my ignorance but is it possible to have private communication with this? If you can connect to my machine maybe you can see where I am going wrong.
.
Best regards,

Djordje Radovanovic

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: Fail to upload file
« Reply #10 on: November 10, 2014, 09:14:09 AM »
Hi Bruce,

As you can see in my previous posting, I did exactly what you suggested.

>> In your example multi24.ico is installed in examples\Capesoft\NetTalk\FTP\ABC folder, so if you not remove multi24.ico from that folder you can not be sure about download.

so with no doubt I can tell, as far as I understand, that file is not downloaded.

Best regards,

Djordje Radovanovic


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11300
    • View Profile
Re: Fail to upload file
« Reply #11 on: November 10, 2014, 09:19:25 PM »
email me, and I'll Team-Viewer in to see what you are seeing. Or better yet join in the UserGroup Webinar on Thursday and we can go over the process and perhaps see what is, or isn't working.

cheers
Bruce

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: Fail to upload file
« Reply #12 on: November 11, 2014, 03:24:55 AM »
Thank you,

I'll join UserGroup Webinar On Thursday.

Best regrards

Djole

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: Fail to upload file
« Reply #13 on: November 19, 2014, 10:59:59 AM »
Bruce,

any update on FTP?

Best regards,

Djordje Radovanovic