java - 将android base64上传到codeigniter
问题描述
我可以将 Base64 图像从 Andoid 上传到 Codeigniter 吗?什么最简单的代码?
这是我的代码,但不支持 base64:
$config['upload_path'] = './asset/uspic/'; //On "userpic" upload
$config['allowed_types'] = 'jpg|png'; //Jpg and Png Only
$config['max_size'] = '2048'; //2MB
$config['max_width'] = '2048'; //max width images
$config['max_height'] = '2048'; //max height images
$config['encrypt_name'] = TRUE;
//$config['file_name'] = $prna; //set new Name
$this->load->library('upload', $config); //load library upload
$fnm = null;
//Photos is detected OK
if ($this->upload->do_upload('img')){
//Get Filename
$fnm = $this->upload->data('file_name');
//Update user table on "Photo" column where Mail as ID
$this->waterm->uptabusr(array('surel' => $mail), array('photo' => $fnm));
}
解决方案
推荐阅读
- javascript - 无法通过其默认构造函数动态实例化我的自定义元素
- amazon-cloudwatch - 将事件从一个 CloudWatch 日志流传输到另一个
- python - read_excel vs read_csv:object-dtype 列行为
- r - 将字符添加到列中的重复行
- xcode - 防止接口名称在 OSX 包中公开
- node.js - node js中是否有任何地址验证api?
- python - 通过操作系统限制 Environment.yml 依赖项
- nfc - NFC 读取器 ACR122U 和 libnfc.driver.acr122_usb 无法写入 USB(结果太大)
- development-environment - wix 中的库存检查器 api
- action - ThingsBoard:如何在点击时打开对话框