CORS and the file service


I am creating an angular application, and I want to use the preconfigured ‘files’ service to store some .pdf files.

I created a folder ‘pdfs’ and a .pdf file ‘testpdf1.pdf’, and placed them into the ‘files’ folder like so: files/pdfs/testpdf1.pdf.

Then I tried to GET testPdf1.pdf in angular like so

    method: 'GET',
    url: '',
    headers: {
        'X-DreamFactory-Api-Key': 'theApiKey',
        'X-DreamFactory-Session-Token': 'theToken'
}, function(err){

For some reason this causes a CORS error. Which is peculiar because

  1. I have configured the CORS settings to accept everything
  2. I have already successfully communicated to this API without getting a CORS error
  3. I can perform the same API call in API Docs and Postman
  4. I can do a GET files/pdfs/ without problem

What could be the problem, and what could be done to fix it?


Known bug in older version of DF. Are you up to date? If not, I recommend upgrading.