Question:
Using UploadFileByName + PreserveDate = 1 in ChilkatVersion: 9.5.0.40, gives an error.
It looks like the Chilkat don't know the file name ("StatusMessage: No such file")
An upload using a FTP Client like Core FTP works fine.
Using PreserveDate = 0, no error but of course I cannot keep the datetime stamp.
Any suggestion?
Bellow is the error text:
ChilkatLog
UploadFileByName
DllDate: Jun 10 2014
ChilkatVersion: 9.5.0.40
UnlockPrefix: TAHIRKSSH
Username: HOME:User
Architecture: Little Endian; 32-bit
Language: ActiveX
VerboseLogging: 0
SshVersion: SSH-2.0-OpenSSH_5.8p1-hpn13v11
SftpVersion: 3
uploadFileByName:
remoteFilePath: /SFTP/Tills/x.xls
localFilePath: D:/0/x.xls
localFileSize: 441
sftpOpenFile:
remotePath: /SFTP/Tills/x.xls
access: writeOnly
createDisposition: createTruncate
v3Flags: 0x1a
Sent FXP_OPEN
handle: 00000000
--sftpOpenFile
uploadFile:
socketOptions:
SO_SNDBUF: 8192
SO_RCVBUF: 8192
TCP_NODELAY: 1
--socketOptions
handle: 00000000
fromLocalPath: D:/0/x.xls
localFileSize2: 441
writeDataSource:
smallWindowSizeUpload:
End of data stream...
------------------------------------------------
totalNumBytesSent: 441
totalTimeSendingMs: 0
totalTimeReadingMs: 0
--smallWindowSizeUpload
--writeDataSource
elapsedTimeMs: 1078
bytesPerSecond: 409
uploadFileSuccess: 1
--uploadFile
setLastModifiedTime:
FileAttr_v3:
lastAccessTime: 0x52d83c45
lastModTime: 0x52d83c45
--FileAttr_v3
StatusResponseFromServer:
Request: SetLastModifiedTime
InformationReceivedFromServer:
StatusCode: 2
StatusMessage: No such file
--InformationReceivedFromServer
--StatusResponseFromServer
--setLastModifiedTime
Failed to preserve the last-mod date/time for the uploaded file.
sftpCloseHandle:
handle: 00000000
Sent FXP_CLOSE
StatusResponseFromServer:
Request: FXP_CLOSE
InformationReceivedFromServer:
StatusCode: 0
StatusMessage: Success
--InformationReceivedFromServer
--StatusResponseFromServer
--sftpCloseHandle
--uploadFileByName
Failed.
--UploadFileByName --ChilkatLog
Try this new build:
http://www.chilkatsoft.com/download/preRelease/ChilkatAx-9.5.0-win32.zip
Chilkat does this internally: Opens the remote file to get a handle. Uploads the file. Sets the last-mod date/time using the handle. Lastly, closes the handle.
I suspect some servers don't think the file exists until the handle has been closed. With this fix, Chilkat will automatically re-try setting the last-mod after closing the handle.
Yes, the new version solved the issue. Thanks you.