how to convert a byte[] to HttpPostedFileBase using c#
<p>how to convert byte[] into HttpPostedFileBase using c#. here i have tried the following way. </p>

<pre><code>byte[] bytes = System.IO.File.ReadAllBytes(localPath);
HttpPostedFileBase objFile = (HttpPostedFileBase)bytes;
</code></pre>

<p>I am getting an cannot implicitly convert error.</p>