0
Answered

Error uploading: request body stream exhausted

Denny 3 weeks ago in iPad updated by Alexander Blach (Developer) 3 weeks ago 5

Error uploading: request body stream exhausted


I've been getting this error for awhile when uploading to a particular server. I get the error with WebDAV or SFTP. It seems to happen with most files. Smaller files are more likely to succeed. I use another WebDAV/FTP app with no problems with this server. Not sure if it's a Textastic issue or something with the server.

Thanks!

I also get this error:

Errors occured

Error uploading "filenamehere.html":

Transferred a partial file


+1
Under review

There is a known problem with uploads to some servers when using FTPS connections. 


Are you sure this is an SFTP connection and not an FTPS connection?

From the release notes of Textastic 10.3.2:

Textastic uses libcurl to transfer files to FTPS servers. On some FTPS servers, uploading a file with curl when using TLS 1.3, if the file is larger than about 18 KB, may result in a "partial upload" error and a 0-byte file on the server.

To work around this partial file upload issue, you can reduce the maximum TLS version to 1.2.

Note: This is only relevant for FTPS connections. SFTP connections are not affected.

This issue has also been reported to the curl project and will hopefully be fixed in a future update of the library. In the meantime, you can use this workaround.

So, if this is indeed an FTPS connection, please try to set the maximum TLS version to 1.2 in the connection's settings and see if this helps.

Alexander, thank you! You were correct, it was FTPS, and the work around did the trick.

Thanks!

I'm glad that it worked! 


I believe that the latest version of libcurl includes a fix for this issue and I hope to update Textastic soon with this new version so that this workaround will no longer be necessary. 


The problem is that TLS 1.3 connections are not shut down properly after the upload finishes, so some FTPS servers reject the uploaded file.