| Reference | Downloads | Github

How to check whether a resource is available yet in online experiment?

URL of experiment:
Description of the problem:
I make the block condition file as a variable and it will be preload in the first routine online.
But sometimes, procedures occur error when the next routine was executed but the condition file has not fully loaded. I want to know How to check whether a resource is available in the builder mode?

Have a look at the download resources section of my code snippets page

However, don’t use Download Resources in combination with the latest version of PsychoPy – though the test should still work

Each Frame
try {
psychoJS.serverManager.getResource(expInfo["participant"] + ".jpg");
    continueRoutine = false;
} catch (e) {}