Upload larger pdf file error

sinmu wrote on Friday, February 05, 2010:

Hi

For patient medical record, we can upload a number of file type like pdf file or jpg. However we configure our php.ini to upload large file if needed.   I was surprised I can only upload pdf file size of 5MB and not more than 15MB.  Why is this happen. though I already set the large file size limit in the php.ini.   Anyone can help?

sinmu

penguin8r wrote on Tuesday, March 30, 2010:

I got zapped by the same thing, turns out that in addition to adjusting your php.ini files accordingly, there are some hidden file size limits in the source html for the upload dialog pages.  If you go to your OpenEMR/templates directory, you will find 2 directories named ‘documents’ & “document categories” , under each of those directories is a file named “general_upload.html”. 
Edit each “general_upload.html” file, find the line that says:

<input type="hidden" name="MAX_FILE_SIZE" value="12000000" />

and adjust 12000000 (12MB) to something more realistic like 64000000

this should correct the issue.

bradymiller wrote on Wednesday, March 31, 2010:

hey,
thanks for that. I committed that to the cvs development tip, and it will go out in the next 3.2.0 patch. After I committed this, I began to wonder if 64MB is enough?
-brady

penguin8r wrote on Wednesday, March 31, 2010:

Thanks brady!  I was going to ask if we could get that changed in the source so I don’t have to remember to edit it all the time.
I’m not sure if 64MB is enough either, I actually changed it to 96MB on a couple of servers.  I have to wonder if whoever put that in meant it as sort of a safety measure to keep someone from accidentally trying to upload a really huge file.  Last I knew, PHP wouldn’t allow you to upload anything > 512MB anyway, but that could be why it was there.  Seems like 64MB should be adequate most of the time, maybe we should just add a note in the documentation for people who want to modify it in the event they are storing some type of large files?

sinmu wrote on Thursday, April 01, 2010:

thanks for you guys, it could be solved.  yes I think 64MB should be good enough, I have experienced encounter some staff are upload much around that pdf file size of 64MB, because they are converting from the conventional scan document into pdf archives where it contain a more than ten years of EMR records,