We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 16ff8f4 + 2aaf5d8 commit db265eeCopy full SHA for db265ee
templates/web/src/sdk.ts.twig
@@ -514,6 +514,11 @@ class {{ spec.title | caseUcfirst }} {
514
{% if 'multipart/form-data' in method.consumes %}
515
{% for parameter in method.parameters.all %}
516
{% if parameter.type == 'file' %}
517
+
518
+ if(!({{ parameter.name | caseCamel | escapeKeyword }} instanceof File)) {
519
+ throw new {{spec.title | caseUcfirst}}Exception('Parameter "{{ parameter.name | caseCamel | escapeKeyword }}" has to be a File.');
520
+ }
521
522
const size = {{ parameter.name | caseCamel | escapeKeyword }}.size;
523
524
if (size <= {{ spec.title | caseUcfirst }}.CHUNK_SIZE) {
0 commit comments