Comments (4)
Can you please add a separate issue for this as I see no connection with the OP's issue. And if you can use my code as a reference instead of coding from scratch; basically I upload in chunks, and various other stuff that might be useful and/or might solve your problem automatically. Please see UploadFileInternal
from fluentftp.
This is an issue in FluentFTP. I'm working on this. The error is because the data stream used for writing the file is parallel to the FTP control stream. I need to find a way to delay the control stream so race conditions don't occur. I'll be adding the alt version in another API, probably called UploadFile()
or similar. I'll let you know when its ready.
from fluentftp.
I have fixed this in 16.0.17 if you use the high level UploadFile and DownloadFile API. This is the code I used to test:
static void TestUploadDownloadFile() {
using (FtpClient cl = new FtpClient()) {
cl.Host = m_host;
cl.Credentials = new NetworkCredential(m_user, m_pass);
// 10 M file
cl.UploadFile(@"D:\bigfile.exe", "/public_html/temp/big.txt");
cl.Rename("/public_html/temp/big.txt", "/public_html/temp/big2.txt");
cl.DownloadFile(@"D:\bigfile_2.exe", "/public_html/temp/big2.txt");
}
}
Please check with the latest version and see if it solves your problem.
from fluentftp.
Hi @hgupta9,
I'm using the low-level commands for uploading to be able to get progress info, ie. OpenAppend/OpenWrite and stream methods Write, Flush, then Close and Dispose.
After completed upload I'm calling Rename on the client, however what I'm seeing is that theres is a long wait before the Rename completes. Also if I do not insert a thread delay I get an exception on the rename command. Furthermore the bigger the file the longer the delay.
I am really impressed by the transfer speed, but unfortunately it takes longer renaming the file than transferring it. I'm testing with files larger than 100MB and I'm using the FluentFTP in a Xamarin project for iOS and Android.
I upload to a temporary name and then rename as I have a backend software that watches the upload folder.
Can I do anything to shorten the delay?
I have also tried disconnecting and reconnecting, in this case the disconnect is delayed. Once reconnected the rename is instantaneous.
from fluentftp.
Related Issues (20)
- FtpCommandException: Code: 553 Message: Could not create file.
- Enhancement: Extend the built-in verification of all major file transfer methods with size comparison. HOT 5
- Support handling retries on Authentication Exceptions HOT 1
- Connection process hangs when attempting AutoConnect HOT 14
- Error in DownloadDirectory with progress parameter HOT 3
- Download with Progress throws exception HOT 9
- Download doesn't proceed when deployed to Azure Container HOT 16
- Process hang with GnuTLS on Linux/ARM64 HOT 9
- Upload within Parallel.ForEach() HOT 11
- Expection FluentFTP.Exceptions.FtpCommandException: Code: 550 Message: Command not recognized or allowed when use GetListing method HOT 2
- AuthenticateAsClientAsync doesn't respect ReadTimeout in a certain scenario HOT 4
- FtpException thrown downloading file with 49.0.2 works in 49.0.1 HOT 4
- Problems uploading a file into a ftp server with TLS HOT 7
- AsyncFtpClient - The operation has timed out HOT 27
- PRT and EPRT don't respect the configured proxy HOT 6
- GetObjectInfo fails for file names with spaces HOT 6
- Error on FTP UPDATFILE after sucessfull connect HOT 1
- Override Read(Span), ReadAsync(Memory), Write(ROS), WriteAsync(ROM) in streams HOT 3
- Issue with AS400 change - AfterConnect actions cannot be undone HOT 21
- Should FTP work be done with temp files? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluentftp.