Page 1 of 1
Version 12.3 : Net core API GetImageFileInfo response error
Posted: Tue Dec 05, 2023 3:51 pm
by jwalit.katira
Hi Team,
I have updated Net Core API to Version 12.3, MyVintasoftImageCollectionApi/GetImageFileInfo is responding as error as below, I have not override this method
Code: Select all
{
"files": null,
"success": false,
"blocked": false,
"errorMessage": "Data storage item key is not correct. (Parameter 'key')\r\n",
"requestId": null
}
Above is called when i give file to image viewer
Code: Select all
imageViewer.get_Images().openFile("C://Jwalit//Sample Files//24521447.tif");
Above is working properly in 12.2.11
Let me know if any changes need to be done for version 12.3
Thanks
Jwalit Katira
Re: Version 12.3 : Net core API GetImageFileInfo response error
Posted: Wed Dec 06, 2023 10:43 am
by Alex
Hi Jwalit,
In version 12.3 the "Data storage item key is not correct" error occurs if file identifier is a rooted path.
Why do you use rooted path as a file identifier?
Best regards, Alexander
Re: Version 12.3 : Net core API GetImageFileInfo response error
Posted: Thu Dec 07, 2023 3:49 pm
by jwalit.katira
Hello Alex,
I didn't understand and can you explain in detail or share an example what is wrong and how it need to done
Thanks
Jwalit Katira
Re: Version 12.3 : Net core API GetImageFileInfo response error
Posted: Thu Dec 07, 2023 5:46 pm
by Alex
Hello Jwalit,
For solving the problem you need to do the following steps:
- In each Vintasoft API controller override the CreateSessionDataStorage method:
Code: Select all
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", sessionId);
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
return new StreamDataStorage(path);
}
- Use file names (for example "24521447.tif") as file identifiers.
Please try to update your code and let me know if you will have any question or problem.
Best regards, Alexander
Re: Version 12.3 : Net core API GetImageFileInfo response error
Posted: Wed Dec 13, 2023 2:54 pm
by jwalit.katira
Hi Alex,
i am getting below message
Code: Select all
{
"files": null,
"success": false,
"blocked": false,
"errorMessage": "File \"24521447.tif\" is not found.\r\n",
"requestId": null
}
i have also made changes in openfile as below
Code: Select all
imageViewer.get_Images().openFile("24521447.tif");
let me know if any changes need
Thanks
Jwalit Katira
Re: Version 12.3 : Net core API GetImageFileInfo response error
Posted: Wed Dec 13, 2023 7:21 pm
by Alex
Hi Jwalit,
Data storage concatenates the storage folder path and file name if file path is necessary.
In your case:
1. The storage folder path is "C:/Jwalit/Sample Files/{sessionId}/"
2. File name is "24521447.tif"
Please make sure that your computer has file with path "C:/Jwalit/Sample Files/{sessionId}/24521447.tif".
Best regards, Alexander
Re: Version 12.3 : Net core API GetImageFileInfo response error
Posted: Thu Dec 14, 2023 8:43 am
by jwalit.katira
Hi Alex ,
Yes it is working now , thanks for sharing
Thanks
Jwalit Katira