Hi,

You shouldn't be doing that at all. If you want the file to be accessable
you need to include it in your media folder in the project - that's per
design.

The way django (and all other frameworks) work is to make sure that only
the items present in the application should be allowed. Even if you COULD
use for example "file://home/andreas/file.pdf" as a link, it wouldn't work
on anything else but YOUR machine, because that points to YOUR harddrive
and nowhere else.

Regards,

Andréas

2018-02-28 14:36 GMT+01:00 sam kavuri <kavuri.sam...@gmail.com>:

> I am new to Django and trying to access binary file which is outside
> project folder and open it in the browser.
>
> When i try to do that it is saying Cross-Origin Request is blocked
> (Reason: CORS header 'Access-Control-Allow-Origin missing).
>
> Somebody, please help on this.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/e74586f4-4831-4779-bf98-4d36221bee57%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/e74586f4-4831-4779-bf98-4d36221bee57%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK4qSCe9JVLg6VBBoY9Atp237KQ9Cohv1a_Lfc_qH9PpL3WxVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to