首页 > 解决方案 > 将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));
              }

标签: javaphpandroidcodeigniter

解决方案


推荐阅读