In .NET core we have override CreateSessionDataStorage method to give response as blob stream , below is sample code
protected override IDataStorage CreateSessionDataStorage(string sessionId)
{
return new BlobDataStorage();
}
public class BlobDataStorage : IDataStorage
{
public object GetItemCopy(string key)
{
if (Contains(key))
{
var blobclient = new BlobClient("UseDevelopmentStorage=true", "service",key);
return blobclient.OpenRead();
}
else
throw new Exception(string.Format("Data storage does not have image with identifier \"{0}\".", key));
}
...
the method GetImageFileInfo() is taking almost 1 min to response for 1260 array of jpg . if is is just JSON response cannot we some how give response directly same method GetImageFileInfo() i override as as response stream from physical 1260 array of jpg file it is only take 3 sec
protected override IDataStorage CreateSessionDataStorage(string sessionId)
{
if (sessionId == null)
{
if (IsEmptySessionSupported)
sessionId = "";
else
throw new ArgumentNullException("sessionId");
}
string path = Path.Combine("C:\\Jwalit\\Sample Files\\JPEGNEW\\", sessionId);
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
return new StreamDataStorage(path);
}
can you please suggestThanks
Jwalit katira
