The Javascript file won't work if the Drupal site is installed in a subdirectory. That code uses a url of '/ajax/s3fs_cors' (shortly after the "Step 1: Get the signed S3 upload form from Drupal" comment).

One option is to do what Views does: it adds a Javascript setting 'ajax_path' with the value url('views/ajax'), and then uses that in Javascript (Drupal.settings.views.ajax_path) to form the AJAX URL.

Comments

coredumperror’s picture

Thanks for bringing this to my attention. I think your solution is definitely a good idea. However, I have very little free time, and this module is a low priority for me. If you would like to write up a patch, I'd be glad to integrate it, but I can't guarantee that I'll be able to implement this fix myself any time soon.

fozdemir’s picture

You should add this to the known issues section of the project page until you fix it.

coredumperror’s picture

Good idea. Done.

eojthebrave’s picture

You might also be able to accomplish this same thing using the Drupal.settings.basePath variable in your JS. This should be either "/", or the sub-directory in which Drupal resides.

jayelless’s picture

Issue tags: +needs port to 8.x-1.x