protected function writeToContainer($type, $path, $payload)
    {
        try {
            $this->container->{'uploadFrom'.$type}($path, $payload);
        } catch (UploadFailedException $e) {
            return false;
        }

        return $this->getMetadata($path);
    }