react-file-viewer
react-file-viewer copied to clipboard
Opening documents from an HTTP url results to error (screenshot attached)
I am having problems when loading files from our server. The files are getting downloaded without problem in my machine, it only has problems when I'm using the link in the filePath.

Same here
Try adding:
{'Access-Control-Allow-Origin': 'localhost:3000','Access-Control-Allow-Credentials': True}
//your react development server
to response.
I don't know what backend you're using, but in django you also need to add : CORS_ORIGIN_ALLOW_ALL = True in settings.py.
Actually i don't know if it will work in rest framework or something other.