You are viewing limited content. For full access, please sign in.

Question

Question

How to get the on prem self hosted Laserfiche API to accept a file larger than 100MB

asked on June 26, 2023

I have installed the on-prem version of the Laserfiche API and it is working well.

When I tried to create an entry with a file size larger than 100MB I got a 413 error. I was able to get past that error by editing the web.config file and increasing the maxAllowedContentLength as mentioned in this post: https://answers.laserfiche.com/questions/184791/The-request-failed-with-HTTP-status-413-Request-Entirty-Too-Large-error-received-when-scanning-in-Web-Client (I also tried the answer in this post but it did not help https://answers.laserfiche.com/questions/174587/413-Request-Entity-Too-Large--Workflow-Web-Service-API)

I now get the below 400 error and have not been able to get past it, any help would be appreciated:

{
    "errors": {
        "": [
            "Failed to read the request form. Request body too large."
        ]
    },
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "00-c414bebff3144221dae13990107cd611-6b3eccb5029d9e28-00"
}

0 0

Answer

SELECTED ANSWER
replied on June 27, 2023

After investigation, the upload file size limit could be increased by modifying configuration files. There are 2 files need to be modified.

1. In C:\Program Files\Laserfiche\API Server\LFRepositoryAPI\webconfig, change 

<requestLimits maxAllowedContentLength="104857600" />

2. In C:\ProgramData\Laserfiche\API Server\LFRepositoryAPI\appsettings.json, change or add

"UploadFileSizeLimitMb": 100

(Please not the unit for UploadFileSizeLimitMb is MB, not byte)

FYI, there is another issue for self-host import document, the solution is post in Known Issues part here https://support.laserfiche.com/kb/1014404/release-notes-for-laserfiche-api-server

0 0

Replies

replied on June 26, 2023

The maximum file size allowed for our current V1 import API is 100Mb. It's documented in the API Swagger page.

We will have an import API to handle uploading large file in V2.

1 0
replied on June 26, 2023 Show version history

That makes sense for cloud but for the self hosted version? And embedded deep in the application, not exposed via a configuration file?
 

I’m sorry but if so, that kind of limitation seems short-sighted, arbitrary, and low.

 

0 0
SELECTED ANSWER
replied on June 27, 2023

After investigation, the upload file size limit could be increased by modifying configuration files. There are 2 files need to be modified.

1. In C:\Program Files\Laserfiche\API Server\LFRepositoryAPI\webconfig, change 

<requestLimits maxAllowedContentLength="104857600" />

2. In C:\ProgramData\Laserfiche\API Server\LFRepositoryAPI\appsettings.json, change or add

"UploadFileSizeLimitMb": 100

(Please not the unit for UploadFileSizeLimitMb is MB, not byte)

FYI, there is another issue for self-host import document, the solution is post in Known Issues part here https://support.laserfiche.com/kb/1014404/release-notes-for-laserfiche-api-server

0 0
replied on June 29, 2023

That worked thanks!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.