I manually download resources in the code, but my experiment shows the following error:
- when downloading the resources for experiment: view_image_trial
- unable to download resource: stimuli/blur/0/01.jpg (FILE_LOAD_ERROR)
I looked at the console, and it shows that https://run.pavlovia.org/nssrperception/view_image_trial/html/stimuli/blur/0/01.jpg
responds with 404(), which seem to be the reason for the error. Did this error occurred because my experiment is only piloting instead of running?
here is the code:
// image_name starts with the directory of set_name and find the image number with ending “.jpg”
image_name = (((img_set_name + “/”) + image_number_name) + “.jpg”);
// in my example, image_name = “0/01.jpg”
blur_image_path = (“stimuli/blur/” + image_name);
clear_image_path = (“stimuli/clear/” + image_name);
psychoJS._serverManager.downloadResources([
{name: blur_image_path, path: blur_image_path},
{name: clear_image_path, path: clear_image_path},
]);