title: No such file or directory error in django
body: <p>Whenever I am calling the uploaded_file_url in django,it shows</p>
  
  <p>IOError at /home/
  [Errno 2] No such file or directory: '/media/sample_6bYaPzY.py'</p>
  
  <p>But I checked manually.The directory and file are exist</p>
  
  <p>Here is my code</p>
  
  <pre><code>uploaded_file_url=None
  uploaded_file_url2=None
  def upload(request):
      if request.method == 'POST':
          #request.FILES['myfile'] and request.FILES["myfile1"]:
          myfile=request.FILES['myfile']
          myfile2=request.FILES["myfile2"]
          fs = FileSystemStorage()
          filename = fs.save(myfile.name, myfile)
          filename2=fs.save(myfile2.name, myfile2)
          global uploaded_file_url
          uploaded_file_url = fs.url(filename)
          global uploaded_file_url2
          uploaded_file_url2 = fs.url(filename2)
          return HttpResponseRedirect('/home/')
  
  
          #upload_file = request.FILES['upload_file']
          #data = [row for row in csv.reader(upload_file.read().splitlines())]
      return render(request, 'myapp/upload.html')
  
  
  def home(request):
      data= open(os.path.join(settings.MEDIA_ROOT, str(uploaded_file_url)),'rb').read()
      //some code here
      return render(request,'myapp/home.html',{"a":a})
  </code></pre>
  
  <p><strong>settings cofiguration</strong></p>
  
  <pre><code>MEDIA_URL = '/media/'
  MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
  </code></pre>
  
  <p>Here I want to open the uploaded_file . Any suggestions here.Thanks in advance</p>