deleteObjects example

foreach ($result->getContents() as $item) {
            $key = $item->getKey();
            if ($key !== null) {
                $objects[] = new ObjectIdentifier(['Key' => $key]);
            }
        }
        if (empty($objects)) {
            return;
        }

        foreach (array_chunk($objects, 1000) as $chunk) {
            $this->client->deleteObjects([
                'Bucket' => $this->bucket,
                'Delete' => ['Objects' => $chunk],
            ]);
        }
    }

    public function createDirectory(string $path, Config $config): void
    {
        $this->inner->createDirectory($path$config);
    }

    
Home | Imprint | This part of the site doesn't use cookies.