- This topic has 8 replies, 3 voices, and was last updated 5 years, 8 months ago by
kimbomadsen.
-
AuthorPosts
-
-
March 24, 2020 at 22:26 #54572
mrluigi2017
ParticipantHi Kim,
I’ve created a fileserver+client with kbmmw and uploading works fine except with large files (the file I tried was a +5GB zip ). I don’t get any exception it’s just that the file transfer seems to stop after 1.009.617 kb this number is the same every time.
I have set the MaxFileSize property to zero. Any suggestions what might be the problem?
kbmmw 5.09.00 enterprise with Delphi 10.2.3
På forhånd tak
-
March 28, 2020 at 17:47 #54577
mrluigi2017
ParticipantI figured out that downloading a large file doesn’t work either. I think the cause is that an int 64 is assigned to an VarArray with varIntegers.
function TkbmMWFileService.PerformGET
Result:=VarArrayCreate([0,2],varInteger);
// Prepare result.
Result[0]:=FFileToken;
Result[1]:=ofs; //is an int64
Result[2]:=sz; // is an int64Although I didn’t find anything for my upload problem I suspect it could be the same type of issue.
-
March 30, 2020 at 16:05 #54578
mrluigi2017
ParticipantI also have an issue that the transfer is very, very slow. I think I am doing something wrong, but I have no clue what it is.
-
March 30, 2020 at 21:53 #54579
mrluigi2017
ParticipantThe slow transfer issue is solved. I have changed the chunksize to 1048576 and the speed is good now. There is however still an issue with downloading a large file. See the code in the second post. Uploading large files (larger than max int) doesn’t seem to be a problem.
-
April 12, 2020 at 09:56 #54591
mrluigi2017
ParticipantWhat exactly do you mean? You can set the blocksize in the kbmMWFileClient. I haven’t figured out yet howto deal with the filesize issue.
-
April 14, 2020 at 14:07 #54638
kimbomadsen
KeymasterHi,
It is true that I did not anticipate sending huge files (>2GB) back in the days.
However I have tried with a 2.4GB file without problems after making a few small changes.
In kbmMWFileClient.pas do:
Line 48. Change to:
Size:int64;Line 352: Change to:
n:integer;
bs:int64;In kbmMWFileService.pas do:
Line 524: Change to:
Result:=VarArrayCreate([0,2],varVariant);Line 537: Change to:
FFinal:=(ofs>=sz);Futher make sure (as you have on the client side, but probably also need on the server side) to set BufferSize to 1MB. On the server it is set on the returned TkbmMWFileServiceDefinition instance where you register the file service.
Let me know how it goes. The fixes is in the next release.
best regards
Kim/C4D
-
This reply was modified 5 years, 8 months ago by
kimbomadsen.
-
This reply was modified 5 years, 8 months ago by
-
April 15, 2020 at 10:47 #54643
mrluigi2017
ParticipantHi Kim,
It works 🙂 Just tested it with a 64GB file up and down.
It is true that I did not anticipate sending huge files (>2GB) back in the days.
I don’t blame you. It takes more than 31 weeks on a 28.8 modem 🙂
Thank you!!!
-
This reply was modified 5 years, 8 months ago by
mrluigi2017.
-
This reply was modified 5 years, 8 months ago by
-
April 15, 2020 at 15:00 #54645
kimbomadsen
KeymasterHi Luigi,
That’s great. It has already been committed to the C4D SVN, so will be included in next release.
best regards
Kim/C4D
-
-
AuthorPosts
- You must be logged in to reply to this topic.
