VintaSoft Imaging .NET SDK and Plug-ins Discussions

Questions, comments and suggestions concerning VintaSoft Imaging .NET SDK.

Board index < VintaSoft Imaging < VintaSoft Imaging .NET SDK and Plug-ins Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

Version 12.3 : Net core API GetImageFileInfo response error



Version 12.3 : Net core API GetImageFileInfo response error

Post 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
{
    "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
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

Post 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

Post 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

Post by Alex »

Hello Jwalit,

For solving the problem you need to do the following steps:
  • In each Vintasoft API controller override the CreateSessionDataStorage method:
    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

Post by jwalit.katira »

Hi Alex,

i am getting below message
{
    "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
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

Post 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

Post by jwalit.katira »

Hi Alex ,

Yes it is working now , thanks for sharing

Thanks
Jwalit Katira


Page 1 from 1: 1