SEBWIN-916: Ensured timestamp of a screen shot request is capture and not transmission time.

This commit is contained in:
Damian Büchel 2024-07-25 17:41:55 +02:00
parent ede6a926cc
commit 0b1746a82e

View file

@ -25,7 +25,7 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring.Service.Requests
{
var imageFormat = (Header.IMAGE_FORMAT, ToString(screenShot.Format));
var metdataJson = (Header.METADATA, metaData.ToJson());
var timestamp = (Header.TIMESTAMP, DateTime.Now.ToUnixTimestamp().ToString());
var timestamp = (Header.TIMESTAMP, screenShot.CaptureTime.ToUnixTimestamp().ToString());
var url = api.ScreenShotEndpoint.Replace(Api.SESSION_ID, sessionId);
var success = TryExecute(HttpMethod.Post, url, out var response, screenShot.Data, ContentType.OCTET_STREAM, Authorization, imageFormat, metdataJson, timestamp);