I would like to upload a folder with more than 100,000 files (more than 30GB), from my remote server to Google Cloud Storage. On the server I have I can not install gsutil. Is there a better way to upload the files? Using the API, that's how it is.
$files = scanDir::scan("../../system_flex/Faturas/Media/", false, true);
$data = array();
foreach ($files as $file) {
$arquivo = str_replace("//", "/", str_replace("../../system_flex/Faturas/", "", str_replace("\\", "/", $file)));
$upload = $bucket->upload(
fopen($file, 'r'), array( 'name' => $arquivo )
);
}
That way it creates many requests and is slow, is there any other way maybe using PHP or some program?