File Service

Home Forums kbmMW File Service

Viewing 7 reply threads
  • Author
    Posts
    • #54572
      mrluigi2017
      Participant

      Hi 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

    • #54577
      mrluigi2017
      Participant

      I 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 int64

      Although I didn’t find anything for my upload problem I suspect it could be the same type of issue.

       

    • #54578
      mrluigi2017
      Participant

      I 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.

    • #54579
      mrluigi2017
      Participant

      The 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.

      • #54590
        TomYU
        Participant

        How do you modify it?

    • #54591
      mrluigi2017
      Participant

      What exactly do you mean? You can set the blocksize in the kbmMWFileClient. I haven’t figured out yet howto deal with the filesize issue.

    • #54638
      kimbomadsen
      Keymaster

      Hi,

      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 2 months, 4 weeks ago by kimbomadsen.
    • #54643
      mrluigi2017
      Participant

      Hi 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 2 months, 3 weeks ago by mrluigi2017.
    • #54645
      kimbomadsen
      Keymaster

      Hi Luigi,

      That’s great. It has already been committed to the C4D SVN, so will be included in next release.

      best regards

      Kim/C4D

Viewing 7 reply threads
  • You must be logged in to reply to this topic.