test with php55

parent 43d3de4c
......@@ -8,11 +8,11 @@ class Upload extends CI_Controller {
public function upload() {
$this->load->helper('upload');
if (ENVIRONMENT == 'production') {
$url = upload_to_bucket('wbt2020.appspot.com', 'uploads');
} else {
//if (ENVIRONMENT == 'production') {
// $url = upload_to_bucket('wbt2020.appspot.com', 'uploads');
//} else {
$url = upload_to_local('./uploads');
}
//}
$this->load->view('upload', array('img_url' => $url));
}
......
......@@ -28,7 +28,7 @@ function upload_to_bucket ($bucket_name, $path) {
// upload a file to local server filesystem
function upload_to_local ($path) {
if(isset($_FILES['file'])) {
$config['upload_path'] = $path;
$config['upload_path'] = 'gs://wbt2020.appspot.com/uploads/';//$path;
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = 20480; // Max file size: 20480 = 20M
$config['max_width'] = 2048;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment