Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Error - Your server is not configured to handle uploads of this size. #668

Closed
rwatts3 opened this issue Dec 21, 2018 · 9 comments
Closed
Labels
bug Something isn't working

Comments

@rwatts3
Copy link

rwatts3 commented Dec 21, 2018

Bug Report

Steps to Reproduce

  1. Using a file field attempt to upload a file.

Expected Behavior

File should upload

Actual Behavior

An error is thrown 3776593926486334747-account_id=1.jpg can't be uploaded. Your server is not configured to handle uploads of this size.

Other Context & Screenshots

https://www.screencast.com/t/7KgazrbPNhk
Using the docker instance for version 7

Technical Details

  • Device: [Desktop]
  • OS: [Windows 7]
  • Web Server: [Nginx]
  • PHP Version: [7.2.0]
  • Database: [MySQL 8.0.12]
  • Install Method: [Docker]
@rijkvanzanten
Copy link
Member

Just to confirm, you are trying to upload a file that's smaller than the php max upload limit? (I think the default is 2MB)

@aiomaster
Copy link

I got the exactly same problem. I installed v7.0.12 today via docker and could not upload files anymore. Before I could, but could not see the thumbnails (cause of https://github.com/directus/docker/issues/10). Now I can see thumbnails but could not upload files anymore. Isn't it ironic?

In the Drop Zone of the fileupload dialog it says:
Max. Size: 0 B
It doesn't matter how large the file is: every upload is blocked by the admin interface.
The relevant settings in php.ini look ok. I think there is a bug reading the correct file size limit, but I don't know if it is a problem in api or app or the docker setup. Many layers offer more possibilities for bugs :)

@aiomaster
Copy link

aiomaster commented Dec 23, 2018

Ok, I digged a little deeper.
Problem was introduced with this commit: https://github.com/directus/app/commit/9b0f67b859e4307d1dc8a38c4ee4c71336a68874
It checks what is stored in $store.state.serverInfo.maxUploadSize but there is nothing, cause the whole server info request failed. The upload works by commenting out this check in the code (very ugly).

If my understanding is right the serverInfo request should go to the root url of the api, but exactly this requests is blocked due to cors issues.
Problem is, that the OPTIONS-request to the root url of the api gets a 405 cause no access-control-* headers were send.
So the remaining question is: is this a bug in the api code or in the docker setup?

@rijkvanzanten
Copy link
Member

I think it's because the api isn't returning that info for some reason

@aiomaster
Copy link

aiomaster commented Dec 24, 2018

just guessing: Maybe the CorsMiddleware does not work for the root path, cause it needs options only available in the context of a project?
I really don't understand the whole code here but I also think it is a problem in the api. So at least this ticket is at the right place. :)

@rwatts3
Copy link
Author

rwatts3 commented Dec 26, 2018

Is this a confirmed issue?
Are there any suggestions for core members on how on how someone can contribute to help correct this problem.

@benhaynes benhaynes added the bug Something isn't working label Dec 26, 2018
@benhaynes benhaynes added this to Needs triage in Bug Triage via automation Dec 26, 2018
@benhaynes benhaynes added this to To do in v2.0.14 via automation Dec 26, 2018
@benhaynes
Copy link
Sponsor Member

@wellingguzman any ideas on this?

@wellingguzman
Copy link
Contributor

this might be related to this one: directus/directus#2271.

@wellingguzman wellingguzman moved this from To do to In progress in v2.0.14 Dec 28, 2018
Bug Triage automation moved this from Needs triage to Closed Dec 28, 2018
v2.0.14 automation moved this from In progress to Done Dec 28, 2018
@wellingguzman
Copy link
Contributor

This issue should be fixed by 236192e.

The max_upload_size is being fetched from ini_get as fallback.

samvasko pushed a commit to samvasko/api that referenced this issue Nov 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
Bug Triage
  
Closed
v2.0.14
  
Done
Development

No branches or pull requests

5 participants