Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to increase upload file size limit in directus latest ? #2189

Closed
jatinseth2007 opened this issue Aug 3, 2018 · 10 comments
Closed

How to increase upload file size limit in directus latest ? #2189

jatinseth2007 opened this issue Aug 3, 2018 · 10 comments

Comments

@jatinseth2007
Copy link

I need to be able upload HD images, so, please suggest how can I allow uploading images size more than 2MB

@meezaan
Copy link

meezaan commented Aug 3, 2018

@jatinseth2007 Have you checked your php.ini settings?

@benhaynes benhaynes added the v6 label Oct 12, 2018
@benhaynes
Copy link
Sponsor Member

Kamino cloned this issue to directus/docs-v7

@benhaynes
Copy link
Sponsor Member

Kamino closed and cloned this issue to directus/directus-6-legacy

@adamjgrant
Copy link

...So how do you do it?

@jatinseth2007
Copy link
Author

@adamjgrant, I managed it by increasing php upload size.

@rijkvanzanten
Copy link
Member

Ref https://stackoverflow.com/a/2184541/4859211

@adamjgrant
Copy link

adamjgrant commented Feb 5, 2019 via email

@jvsLimo
Copy link

jvsLimo commented Mar 26, 2019

+1

Thanks. I tried updating the php.ini value, restarted everything but still see a 2MB limit. There's no setting in directus I should be changing as well? Le lun. 4 févr. 2019 à 07:39, Rijk van Zanten notifications@github.com a écrit :

Ref https://stackoverflow.com/a/2184541/4859211 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#2189 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AATj7hcxhpLPeh4FzSTntlQFRQQPWpiLks5vKFRBgaJpZM4VtzsI .
-- http://adamgrant.me @NiceGoingAdam http://twitter.com/nicegoingadam

@rijkvanzanten
Copy link
Member

There's no setting in Directus itself. The API tries setting the default limit to 50MB in the .htaccess file, but if your server doesn't support setting this value in .htaccess (or you're not using apache) than it's up to whatever php.ini file is being used for your PHP installation.

@ComputerCarl
Copy link

ComputerCarl commented Mar 3, 2020

I am using the Docker image, so I used a WordPress issue to increase the upload size.

I created a new folder named directus-custom under the Directus docker-compose configuration file and then created an uploads.ini file in that folder.

I don't know if any of this is necessary besides the memory_limit, but I like to live fast and loose.

uploads.ini;

file_uploads = On
memory_limit = 16M
upload_max_filesize = 16M
post_max_size = 64M
max_execution_time = 600

Then, in this folder, I also created a Dockerfile file with contents;

FROM directus/directus:v8-apache
COPY ./uploads.ini /usr/local/etc/php/conf.d

Then, in the original docker-compose.yml file, remove/comment the line;

# image: directus/directus:v8-apache

and add the line;

build: ./directus-custom

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants