ENDEVOR ZOWE CLI file upload size limit
search cancel

ENDEVOR ZOWE CLI file upload size limit

book

Article ID: 389446

calendar_today

Updated On:

Products

Zowe Endevor

Issue/Introduction

Endevor web services registered to APIML.

Use the following ZOWE CLI Command to upload file:

zowe endevor add element elementName --env ENV --sys SYS --sub SUB --typ TYPE --ff localfile.txt -i ENDEVOR --ccid CCID --comment 'adding element'

And got the following error:

{
  "messages": [
    {
      "messageType": "WARNING",
      "messageNumber": "ZWEAZ600W",
      "messageContent": "ZAAS cannot generate or obtain Zowe token. Reason: org.apache.tomcat.util.http.fileupload.impl.FileSizeLimitExceededException: The field fromFile exceeds its maximum permitted size of 1048576 bytes.",
      "messageAction": "Make sure z/OSMF is available when using the z/OSMF authentication provider or whether Zowe can generate tokens for other authentication providers. Make also sure that the identity mapping is correctly configured and set for the requested authentication.",
      "messageReason": "Review the reason section of the message.",
      "messageKey": "org.zowe.apiml.zaas.zoweJwt.noToken"
    }
  ]
}

Environment

Endevor V19

ZOWE 2.18

Endevor REST API version: 2.20

Cause

Endevor REST API itself does not have the upload file size limit, but if web service is APIML enabled, the Spring Boot used by APIML has the upload file size limit of 1MB (1048576 bytes). 

Resolution

Update ZOWE.yaml file to increase upload file size limit:

zowe:
  environments:
    SPRING_SERVLET_MULTIPART_MAXFILESIZE: 15MB
    SPRING_SERVLET_MULTIPART_MAXREQUESTSIZE: 15MB

Restart ZOWE STC, and reissue the ZOWE CLI command.