Read with WEB Core Delphi stream file

What is the easiest way to read a file written with Delphi Streamfile with Webcore.

Delphi Code:
Stream := TFileStream.Create(DataDir + 'data\data1.str', fmCreate);
len := SizeOf(Recordx);
Stream.WriteBuffer(len,8); // write len Record
Stream.WriteBuffer(Projekt.Dp, len); // write Record
Stream.Free;

WebCore Code -- but not possible
Stream := TBytesStream.Create;
Stream.LoadFromFile('data\data1.str');
Stream.Read(len,8);
Stream.Read(Recordx,len);
Stream.Free;

Have you tried a TMemoryStream?
If you load the file (if this is a local file, you need a file picker for this), you can assign the TJSArrayBuffer retrieved from the file picker to TMemoryStream.Memory and then read from it.

The file is on the server.

until now i'm doing that by converting to string and then reading into WebMemo.

WebMemo.Lines.LoadFromFile ('data \ webhmi.ini');

But I have to change everything back again, which doesn't necessarily make sense.

With a stream, I could read the entire record at once without conversion.

At stream level, there is at this moment not a LoadFromFile() method.
You could get the file contents using a TWebHttpRequest.
It is an interesting suggestion to have a LoadFromFile() and we've added this on the list for consideration.

this has already been solved
I need to interpret a serial file that is on a server.

something like "LoadFromFileToByteArray()" or "SaveToFileFromByteArray()"

If you use TWebHttpRequest, set ResponseType to rtArrayBuffer and then perform a GET request.
Then, in the OnRequestResponse event handler, you should be able to cast the ARequest.req.response to a TJSArrayBuffer and use this data returned.