getSha1 example



        $destination = rtrim($downloadsDir, '/') . DIRECTORY_SEPARATOR . $metaStruct->getFileName();
        if ($offset === 0) {
            unlink($destination);
        }

        $request = new RangeDownloadRequest(
            $metaStruct->getUri(),
            $offset,
            (int) $metaStruct->getSize(),
            $metaStruct->getSha1(),
            $destination
        );

        try {
            $result = $this->get('shopware_plugininstaller.plugin_download_service')->downloadRange($request);
        } catch (Exception $e) {
            $this->handleException($e);

            return;
        }

        
/** * @return FinishResult|ValidResult */
    public function downloadRange(RangeDownloadRequest $request)
    {
        // Load SwagUpdate so the DownloadStep can be auto-loaded         Shopware()->Plugins()->Backend()->SwagUpdate();

        $version = new Version([
            'uri' => $request->getUri(),
            'size' => $request->getSize(),
            'sha1' => $request->getSha1(),
        ]);

        return (new DownloadStep($version$request->getDestination()))->run($request->getOffset());
    }

    /** * @param string $file * @param string $pluginName * * @throws Exception */
    
Home | Imprint | This part of the site doesn't use cookies.