[Solved] Mmcil - Cloud to Self Host Migration -Error: failed to create upload session: : Unable to upload file. File is too large


I am in the middle of a mattermost cloud to self host migration process.

When I run the import upload command, I get an error indicating the file is too large.

./mmctl import upload cifqc.._export.zip 
Error: failed to create upload session: : Unable to upload file. File is too large.

How can I get around this problem ?

Any help will be appreciated

Check your config file and ensure that file uploadmaxsize is above the size of your file

Thanks Daniel. Yes that is the solution. I increased it.

1 Like

Awesome , glad I could help

Problem 1:

curl -X POST ‘’ -H ‘Authorization: Bearer 9bjfkp9irfri5n7ag43k6okpqa’ --data-binary @/home/ragvendra/Downloads/example.zip

{"id":"app.upload.get.app_error","message":"Failed to get upload.","detailed_error":"resource: UploadSession id: tzku9ayprbnjidn73b48ccpnrh","request_id":"eruap8eyw3gzxkmr8es53u8zha","status_code":404}

How to create a new upload session ?

Problem 2:
curl -F ‘file=@/home/ragvendra/Downloads/terraform-main.zip’ -F ‘channel_id=tzku9ayprbnjidn73b48ccpnrh’ --header ‘authorization: Bearer 9bjfkp9irfri5n7ag43k6okpqa’

{"id":"api.context.permissions.app_error","message":"You do not have the appropriate permissions.","detailed_error":"","request_id":"ygbeqorzjid1prom5s6t7s5rqo","status_code":403}

How to fix this?

Hello Sir
I want to ask something to you

Hello Sir
When i am using this curl

curl -i -F "file=@/home/chicmic/output.zip" -F "channel_id=goxdpb158tf5zpn5qsrq1nydco" -H "Authorization: Bearer 9yz6f1w9kf8dmyfdouqxrmq18w" -X POST https://myapp.staging.chicmic.co.in/api/v4/files

i got this message

HTTP/1.1 403 Forbidden
Date: Wed, 26 Jul 2023 04:31:51 GMT
Server: Apache/2.4.29 (Ubuntu)
Content-Type: application/json
Referrer-Policy: no-referrer
Vary: Origin,Accept-Encoding
X-Content-Type-Options: nosniff
X-Request-Id: de44isgiufd1tyenmcoyz894iy
X-Version-Id: 8.0.0.dev.68da7499656saf15543c7f272a5a274b.false
Content-Length: 237

{"id":"api.context.permissions.app_error","message":"You do not have the appropriate permissions.","detailed_error":"userId=gkuzgwyy37wqukndudr3cyogtr, permission=upload_file,","request_id":"de44isgiufd1saenmcoyz894iy","status_code":403}

Hi Ragvendra,

do the questions relate to the problems you posted above ?

Unfortunately I don’t have answers to those questions. You might want to post those issues in a separate thread/new topic