> ## Documentation Index
> Fetch the complete documentation index at: https://docs.resq.software/llms.txt
> Use this file to discover all available pages before exploring further.

# ResQ.Storage.PinataClient.MockUploadAsync(System.IO.Stream,string,string,System.Collections.Generic.Dictionary string,string )

### [ResQ.Storage](./ResQ.Storage.md "ResQ.Storage").[PinataClient](./ResQ.Storage.PinataClient.md "ResQ.Storage.PinataClient")

## PinataClient.MockUploadAsync(Stream, string, string, Dictionary\<string,string>) Method

Generates a mock upload result with a fake CID for testing purposes.

```csharp theme={null}
private System.Threading.Tasks.Task<ResQ.Storage.UploadResult> MockUploadAsync(System.IO.Stream content, string fileName, string contentType, System.Collections.Generic.Dictionary<string,string>? metadata);
```

#### Parameters

<a name="ResQ.Storage.PinataClient.MockUploadAsync(System.IO.Stream,string,string,System.Collections.Generic.Dictionary_string,string_).content" />

`content` [System.IO.Stream](https://learn.microsoft.com/en-us/dotnet/api/system.io.stream "System.IO.Stream")

The content stream to hash.

<a name="ResQ.Storage.PinataClient.MockUploadAsync(System.IO.Stream,string,string,System.Collections.Generic.Dictionary_string,string_).fileName" />

`fileName` [System.String](https://learn.microsoft.com/en-us/dotnet/api/system.string "System.String")

The filename.

<a name="ResQ.Storage.PinataClient.MockUploadAsync(System.IO.Stream,string,string,System.Collections.Generic.Dictionary_string,string_).contentType" />

`contentType` [System.String](https://learn.microsoft.com/en-us/dotnet/api/system.string "System.String")

The content type.

<a name="ResQ.Storage.PinataClient.MockUploadAsync(System.IO.Stream,string,string,System.Collections.Generic.Dictionary_string,string_).metadata" />

`metadata` [System.Collections.Generic.Dictionary\<](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2 "System.Collections.Generic.Dictionary`2")[System.String](https://learn.microsoft.com/en-us/dotnet/api/system.string "System.String")[,](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2 "System.Collections.Generic.Dictionary`2")[System.String](https://learn.microsoft.com/en-us/dotnet/api/system.string "System.String")[>](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2 "System.Collections.Generic.Dictionary`2")

Optional metadata.

#### Returns

[System.Threading.Tasks.Task\<](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 "System.Threading.Tasks.Task`1")[UploadResult](./ResQ.Storage.UploadResult.md "ResQ.Storage.UploadResult")[>](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 "System.Threading.Tasks.Task`1")\
A mock [UploadResult](./ResQ.Storage.UploadResult.md "ResQ.Storage.UploadResult") with a generated CID.

### Remarks

The CID is generated by computing the SHA256 hash of the content and formatting
it as a base58-style string starting with "Qm". This provides deterministic
CIDs for the same content while maintaining the appearance of real IPFS CIDs.
