MySQL - Uploading Image To BLOB Max Upload Size?

梦想的初衷 提交于 2019-12-18 20:16:45

问题


I'm using file uploading for images into a BLOB in a MySQL database, for some reason when I upload some pictures I noticed they weren't completely rendered, I then tried uploading directly into PHPMyAdmin when it then showed (Max: 64KiB) I luckily enough run my own server so I thought to go check my php.ini for max file upload size, it's set to 250MB. So my question is,

Where is the max filesize for MySQL BLOB Uploads??


回答1:


It depends on the type of your column.

From MySQL documentation:, section Storage Requirements for String Types:

TINYBLOB

L+1 bytes, where L < 28(256 bytes)

BLOB

L+2 bytes, where L < 216(65 kilobytes)

MEDIUMBLOB

L+3 bytes, where L < 224(16 megabytes)

LONGBLOB

L+4 bytes, where L < 232(4 gigabytes)



来源:https://stackoverflow.com/questions/19943529/mysql-uploading-image-to-blob-max-upload-size

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!