|
@@ -19,10 +19,11 @@ public class ClientProvider(IClientCaller clientCaller, IClientBaseProvider base
|
|
|
{
|
|
|
if (current != 1)
|
|
|
return Task.FromResult(false);
|
|
|
+
|
|
|
if (!baseProvider.AllowReceiveFile())
|
|
|
return Task.FromResult(false);
|
|
|
|
|
|
- baseProvider?.StartFileReceiveNotify(fileType);
|
|
|
+ baseProvider.StartFileReceiveNotify(fileType);
|
|
|
stream = new();
|
|
|
_streamBuffer[fileType] = stream;
|
|
|
Timer timer = new(FileCleanerTimerCallback, fileType, 600000, Timeout.Infinite);
|
|
@@ -47,7 +48,7 @@ public class ClientProvider(IClientCaller clientCaller, IClientBaseProvider base
|
|
|
|
|
|
if (_streamBuffer.TryRemove(fileType, out MemoryStream? memoryStream) && memoryStream is not null)
|
|
|
memoryStream.Dispose();
|
|
|
- baseProvider?.FileReceivedNotify(fileType);
|
|
|
+ baseProvider?.FileReceivedNotify(fileType, path);
|
|
|
return Task.FromResult(true);
|
|
|
}
|
|
|
|
|
@@ -111,6 +112,6 @@ public interface IClientBaseProvider
|
|
|
string? ConfigPath { get; set; }
|
|
|
|
|
|
bool AllowReceiveFile();
|
|
|
- void FileReceivedNotify(FileType fileType);
|
|
|
+ void FileReceivedNotify(FileType fileType, string path);
|
|
|
void StartFileReceiveNotify(FileType fileType);
|
|
|
}
|