# media-cloud-sync/1.2.12/includes/sdk/s3/Aws/Exception/CouldNotCreateChecksumException.php

Media Cloud Sync, version 1.2.12. 16 lines.

- Page: https://pluginprobe.com/plugins/media-cloud-sync/1.2.12/code/includes/sdk/s3/Aws/Exception/CouldNotCreateChecksumException.php
- Raw: https://pluginprobe.com/plugins/media-cloud-sync/1.2.12/raw/includes/sdk/s3/Aws/Exception/CouldNotCreateChecksumException.php
- Modified: 2024-10-27T10:40:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/media-cloud-sync/1.2.12/code/includes/sdk/s3/Aws/Exception/CouldNotCreateChecksumException.php#L10-L20`.

```php
<?php

namespace Dudlewebs\WPMCS\s3\Aws\Exception;

use Dudlewebs\WPMCS\s3\Aws\HasMonitoringEventsTrait;
use Dudlewebs\WPMCS\s3\Aws\MonitoringEventsInterface;
class CouldNotCreateChecksumException extends \RuntimeException implements MonitoringEventsInterface
{
    use HasMonitoringEventsTrait;
    public function __construct($algorithm, \Exception $previous = null)
    {
        $prefix = $algorithm === 'md5' ? "An" : "A";
        parent::__construct("{$prefix} {$algorithm} checksum could not be " . "calculated for the provided upload body, because it was not " . "seekable. To prevent this error you can either 1) include the " . "ContentMD5 or ContentSHA256 parameters with your request, 2) " . "use a seekable stream for the body, or 3) wrap the non-seekable " . "stream in a GuzzleHttp\\Psr7\\CachingStream object. You " . "should be careful though and remember that the CachingStream " . "utilizes PHP temp streams. This means that the stream will be " . "temporarily stored on the local disk.", 0, $previous);
    }
}

```
