I have a set of hosted html pages and associated scripts. I copied the files to a new directory structure . After copying the files when trying to run one of the scripts I am getting a Bad Request: 400 error with detail of
Here is the script from the html file that requests a separate script file and is producing the error. The same set of pages worked fine before I copied them to the new directory structure. I have made all the necessary updates in the files to reflect the new directory paths. I don’t see why I am getting the missing application-is error when the app id is in the URL for the request and I have not changed the app id.
Here is the request from the browser console:
POST /B75DC8E3-A4F2-255C-FF29-BE5B2377B400/v1/files/web/FuTr/scripts/upload_challenges.js HTTP/1.1
Host: api.backendless.com
Connection: keep-alive
Content-Length: 38
Accept: /
Origin: https://api.backendless.com
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Content-Type: application/json
Referer: https://api.backendless.com/B75DC8E3-A4F2-255C-FF29-BE5B2377B400/v1/files/web/FuTr/index.html
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Still struggling to get this working. But while I continue to work on it I would like to understand why creating a new copy of my pages/script in a new directory would cause these issues? As mentioned in the initial post the pages & script were working in their original location, when I created new copies in new directories I updated any path references in the new files and at that point I would expect them to just work. Why would moving the files to a new location start to cause these issues with the request format? it seems totally unrelated.
Hi Greg!
We think that new location was not correctly specified:
nodejs scripts works only in web/scripts/… location.
In other folders nodejs scripts will not be executed.
Regards,
Kate.
Thank you Kate. I did not realize that. The new directory structure I created was outside of web/scripts. I will create a new structure back under web scripts and see if things start working again.