Skip to content

Commit 05c3513

Browse files
committed
Refactor file attachment handling: update documentation for file download endpoint; improve response descriptions; correct max file attachment size in configuration files.
1 parent a04062c commit 05c3513

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

source/AAS.TwinEngine.DataEngine/Api/SubmodelRepository/SubmodelRepositoryController.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,13 @@ public async Task<ActionResult<JsonObject>> GetSubmodelElementAsync([FromRoute]
153153
}
154154

155155
/// <summary>
156-
/// Downloads the binary file content of a File SubmodelElement.
157-
/// The Content-Type header is derived from the element's contentType attribute.
156+
/// Downloads file content from a specific submodel element from the Submodel at a specified path.
158157
/// </summary>
159158
/// <param name="submodelIdentifier">The Submodel's unique id (UTF8-BASE64-URL-encoded)</param>
160159
/// <param name="idShortPath">The IdShort path to the File SubmodelElement (dot-separated)</param>
161-
/// <response code="200">Binary file content streamed from the plugin.</response>
162-
/// <response code="400">The element at idShortPath is not a File SubmodelElement, or the request is malformed.</response>
163-
/// <response code="404">Submodel or element not found.</response>
160+
/// <response code="200">Requested File.</response>
161+
/// <response code="400">Bad Request, e.g. the request parameters of the format of the request body is wrong.</response>
162+
/// <response code="404">Not Found</response>
164163
/// <response code="500">Internal Server Error</response>
165164
[HttpGet("{submodelIdentifier}/submodel-elements/{idShortPath}/attachment")]
166165
[ProducesResponseType(typeof(FileResult), (int)HttpStatusCode.OK)]

source/AAS.TwinEngine.DataEngine/ServiceConfiguration/Config/GeneralConfig.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class GeneralConfig
1717
public OpenTelemetrySettings OpenTelemetry { get; set; } = new();
1818
public CacheConfig Cache { get; set; } = new();
1919

20-
public long MaxFileAttachmentSizeBytes { get; set; } = 100 * 1024 * 1024; // 100 MB
20+
public long MaxFileAttachmentSizeBytes { get; set; } = 104857600; // 100 MB
2121

2222
/// <summary>
2323
/// Domain URL of the customer environment (V2: direct property; V1: was AasEnvironment:CustomerDomainUrl).

source/AAS.TwinEngine.DataEngine/appsettings.development.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"BlockedPatterns": ["\\r|\\n", "\\x00", "<script"]
1919
},
20-
"MaxFileAttachmentSizeBytes": 204857600,
20+
"MaxFileAttachmentSizeBytes": 104857600,
2121
"AllowedHosts": "*",
2222
"OpenTelemetry": {
2323
"OtlpEndpoint": "http://localhost:4317",

0 commit comments

Comments
 (0)