Google App Engine PHP image upload

Job ID: 33475211

Budget: $10 – $30 USD

Hi,
I am new to google app engine. Just trying to upload images to cloud storage bucket using vanilla php

But my code is not working

<?php
use google\appengine\api\cloud_storage\CloudStorageTools;
$bucket = 'my-bucket-name.appspot.com';
$root_path = 'gs://' . $bucket . '/';
$folder = ''user1/';
$_url = '';
if (isset($_FILES['file'])) {
$filename = $_FILES['file']['name'];
$location = $root_path . $folder . time() . '_' . rand(0, 9999) . '_' . $filename;
$response = 0;
if (move_uploaded_file($_FILES['file']['tmp_name'], $location))
$response = CloudStorageTools::getImageServingUrl($location);
echo $response;
} else {
var_dump($_FILES);
}


I donot want to CloudStorageTools::createUploadUrl , Let me know if you can solve asap.