Superbalist / laravel-google-cloud-storage

A Google Cloud Storage filesystem for Laravel
MIT License
508 stars 145 forks source link

Upload failed. Please use this URI to resume your upload #116

Open munkiepus opened 2 years ago

munkiepus commented 2 years ago

i'm trying to copy from a local disc to a gcs disk

the simplified version here:

$from = 'local';
$localDisk = Storage::disk($from);
$to = 'archive';
$archiveDisk = Storage::disk($to);

print_r($archiveDisk->allFiles());

// check if a file exists on archive already
if($archiveDisk->exists($file->getSlug())){
    echo "file exists already in archive\n";
} else {
    echo "file not found in archive\n";
}
//check file exists on local disc
if($localDisk->exists($file->getSlug())){
    echo "file exists on local\n";
} else {
    echo "file not found on local\n";
}

$archiveDisk->put($file->getSlug(), $localDisk->get($file->getSlug()));

it pauses for a while then gives this error:

In ResumableUploader.php line 184:

  Upload failed. Please use this URI to resume your upload: <google cloud url>

the print_r does show all files in the bucket so it looks to be configured correctly. but cant seems to send files to it, has anyone else seen this issue?

pomirleanu commented 1 year ago

Hi @munkiepus, I have the same problem, have you managed to get it working?