FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
dwickramasinghe1
Article Id 366569
Description   This article describes how to troubleshoot the 'Upload file is too big or invalid' error on the FortiGate.

Scope

FortiGate, FortiOS
Solution

FortiGate has the option to use custom replacement images within replacement messages. Replacement images are useful for customizing certain login pages and block pages that have been generated from the FortiGate. In some cases, it is possible to run into an error when uploading a custom replacement image file.

 

  1. Go under FortiGate GUI -> System -> Replacement Messages and select 'Manage Images'.

 

replacementImagelocation.png

 

  1. Select Upload Image and attempt to upload the desired image.

 

PNGupload.png

 

  1. It is possible to run into the following error below.

 

PNGError.png

 

Error:

"Upload file is too big or invalid."


When this error occurs, it's possible to utilize some CLI commands to allow for the image to get uploaded.

 

Note:
FortiOS only supports a maximum image file size of 24kb.


config system replacemsg-image

    edit <image_name>
        set image type {gif | jpg | tiff| png}
        set image-base64 <string>
    next
end