wodSFTP PutData Problem - WeOnlyDo Discussion board

wodSFTP PutData Problem (wodSFTP / wodSFTP.NET / wodSFTPdll)

by Jose Roberto Fonseca, Wednesday, October 15, 2008, 19:17 (5681 days ago)

Hello guys,

I have a problem putting data on OpenSSH Server with files large more than 100kb. With ~ 70kb it's perfect, but above this, it´s too slow. Anyone can help me?

Thx,

Re: wodSFTP PutData Problem

by woddrazen, Wednesday, October 15, 2008, 19:23 (5681 days ago) @ Jose Roberto Fonseca

Hi Jose,


Although there is no size limit on sending data to the server using PutData Method, you should try to keep the amount below 64kb.

If amount of data is bigger then 64kb you should use PutFile Method. So you will need to save data to some file and upload it to server using PutFile Method.

Can you maybe that that and let us know how it goes?


Regards,
Drazen

Re: wodSFTP PutData Problem

by Jose Roberto Fonseca, Wednesday, October 15, 2008, 19:27 (5681 days ago) @ woddrazen

Hi Jose,


Although there is no size limit on sending data to the server using PutData Method, you should try to keep the amount below 64kb.

If amount of data is bigger then 64kb you should use PutFile Method. So you will need to save data to some file and upload it to server using PutFile Method.

Can you maybe that that and let us know how it goes?


Regards,
Drazen

Re: wodSFTP PutData Problem

by Jose Roberto Fonseca, Wednesday, October 15, 2008, 19:30 (5681 days ago) @ Jose Roberto Fonseca

Hi,

Thank you for answer me so fast!

Well.. Ok..... but how can i use PutFile with ASP Script?? Any example, please?

The fetch.asp uses PutData.

Thx.

Hi Jose,


Although there is no size limit on sending data to the server using PutData Method, you should try to keep the amount below 64kb.

If amount of data is bigger then 64kb you should use PutFile Method. So you will need to save data to some file and upload it to server using PutFile Method.

Can you maybe that that and let us know how it goes?


Regards,
Drazen

Re: wodSFTP PutData Problem

by Jose Roberto Fonseca, Wednesday, October 15, 2008, 20:45 (5681 days ago) @ Jose Roberto Fonseca

Hello. Me again!

How can i send a file by PutFile method using something like fetch.asp example???

That's my question.

Thx,

Hi Jose,


Although there is no size limit on sending data to the server using PutData Method, you should try to keep the amount below 64kb.

If amount of data is bigger then 64kb you should use PutFile Method. So you will need to save data to some file and upload it to server using PutFile Method.

Can you maybe that that and let us know how it goes?


Regards,
Drazen

Re: wodSFTP PutData Problem

by woddrazen, Wednesday, October 15, 2008, 21:03 (5681 days ago) @ Jose Roberto Fonseca

Jose,


Please try something like this:
[code]objConn.PutFile cstr( c:\something\file.txt ), cstr( /home/something/file.txt )[/code]


Drazen

Re: wodSFTP PutData Problem

by Jose Roberto Fonseca, Wednesday, October 15, 2008, 21:10 (5681 days ago) @ woddrazen

Yes, it´s works fine, but i need a code like fetch.asp (from wodsftp sample file) that works with PutFile Method.

Thx!

Jose,


Please try something like this:
[code]objConn.PutFile cstr( c:\something\file.txt ), cstr( /home/something/file.txt )[/code]


Drazen

Re: wodSFTP PutData Problem

by woddrazen, Wednesday, October 15, 2008, 22:59 (5681 days ago) @ Jose Roberto Fonseca

Jose,


Please change PutData to this:
[code]objConn.PutFile CStr(sFileName), cstr(Session( ListDir ) & oFileName)[/code]
you can also remove code where file is read and import in PutDate Method for upload.


Drazen

Re: wodSFTP PutData Problem

by Jose Roberto Fonseca, Thursday, October 16, 2008, 21:07 (5680 days ago) @ woddrazen

Hi guys,

Doesn't works. Look... this solution run at a application server. I can't send a local path and a file name (sFileName) from a client. I need a way of use PutFile Method in a remote server (iis runing ASP).
Please, i bought this component to my company (Neoenergia from Brasil) and i have this problem.

Thx,

Jose,


Please change PutData to this:
[code]objConn.PutFile CStr(sFileName), cstr(Session( ListDir ) & oFileName)[/code]
you can also remove code where file is read and import in PutDate Method for upload.


Drazen

Re: wodSFTP PutData Problem

by wodDamir, Thursday, October 16, 2008, 22:43 (5680 days ago) @ Jose Roberto Fonseca

Jose,

How long does it take? Could you be more specific?

The only other alternative you could perhaps use is to store a file into some temporary location, and then send it from there.

Since ASP is server side, you won't be able to use PutFile to send file from client. You need to implement a way to pass data instead.

Regards,
Damba

Re: wodSFTP PutData Problem

by Jose Roberto Fonseca, Friday, October 17, 2008, 12:39 (5680 days ago) @ wodDamir

Hi,

13 minutes to send 300 kbytes to a server located in 100/100mbits local lan and 5 seconds to send 70kbytes in same lan.

Ok. Do you have a example code of upload to server, write in a temporary folder and, finally, send to a remote server?

Thx,

Jose,

How long does it take? Could you be more specific?

The only other alternative you could perhaps use is to store a file into some temporary location, and then send it from there.

Since ASP is server side, you won't be able to use PutFile to send file from client. You need to implement a way to pass data instead.

Regards,
Damba

Re: wodSFTP PutData Problem

by wodDamir, Friday, October 17, 2008, 13:26 (5680 days ago) @ Jose Roberto Fonseca

Jose,

I don't have a sample of that. However, the idea is to have a page that saves the file locally, and passes it's location to wodSFTP. Once done, you have the file locally and you can call PutFile method to upload it from web server (asp) to remote SFTP server.

You only need to use wodSFTP to send file from asp server to remote server, not for uploading file to machine running asp.

Hope this helps.

Regards,
Damba

Re: wodSFTP PutData Problem

by Jose Roberto Fonseca, Friday, October 17, 2008, 13:55 (5680 days ago) @ wodDamir

Ok, thank you for help me!


Regards,

Jose,

I don't have a sample of that. However, the idea is to have a page that saves the file locally, and passes it's location to wodSFTP. Once done, you have the file locally and you can call PutFile method to upload it from web server (asp) to remote SFTP server.

You only need to use wodSFTP to send file from asp server to remote server, not for uploading file to machine running asp.

Hope this helps.

Regards,
Damba