Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

How to connect to a .CSV file that's using a SAS token (expired)?

Answered
Martin Torres asked on May 7, 2020

Hello,

I have a dropdown with some pivot table URLs, each of them has configuration options asociated. Once the user select a particular table and change any config option both the pivot report URL and these options are stored in memory. For security reasons, we are using a SAS token in every CSV file URL. 
The problem comes when the user wants to reload a previously stored pivot table and the SAS token has already expired. Is there any way to know that it failed to load the CSV so we can refresh this SAS token and retry? Or we just have to build all the SAS token logic outside of Flexmonster?

Best regards
Martin

1 answer

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster May 8, 2020

Hello, Martin,
 
We suggest checking out the dataerror event provided by the component. It is triggered when some error occurred during the loading of data.
 
Such an event can be used to refresh the expired token and repeat an attempt to load the file.
For example:

flexmonster.on('dataerror', function (e) {
console.log(e.error);
*update the token*
*retry*
});

 
You are welcome to learn more about the event in our documentation.
 
Please let us know if it works for you.
Do not hesitate to contact us in case additional assistance is needed.
 
Best regards,
Illia

Please login or Register to Submit Answer