title: I am having trouble loading the Flask image
body: <p>I uploaded the <a href="http://flask.pocoo.org/docs/1.0/patterns/fileuploads/" rel="nofollow noreferrer">Uploading Files</a> document for photo albums in the project. İmage upload is not working.</p>
  
  <p>Python Code : </p>
  
  <pre><code>UPLOAD_FOLDER = '/static/uploads'
  ALLOWED_EXTENSIONS = set(['png', 'jpg', 'jpeg', 'gif'])
  
  app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
  
  #Album form
  def allowed_file(filename):
      return '.' in filename and \
             filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
  
  @app.route("/admin/fotografAlbumu", methods=["GET", "POST"])
  @login_required
  def upload():
      if request.method == 'POST':
          if 'file' not in request.files:
              flash('No file part')
              return redirect(request.url)
          file = request.files['photo']
          # if user does not select file, browser also
          # submit a empty part without filename
          if file.filename == '':
              flash('No selected file')
              return redirect(request.url)
          if file and allowed_file(file.filename):
              filename = secure_filename(file.filename)
              file.save(os.path.join(app.config['UPLOAD_FOLDER'], filename))
              import pdb;pdb.set_trace()
              return redirect(url_for('uploaded_file', filename=filename))
      return render_template('/admin/galeri.html')
  </code></pre>
  
  <p>HTML Code : </p>
  
  <pre><code>&lt;form method="post" class="col-12" enctype="multipart/form-data"&gt;
                   &lt;ul class="row"&gt;
                       &lt;li class="col-xs-6 col-lg-12" style="border: none;"&gt;
                              &lt;div class="form-group"&gt;
                                      &lt;input id="input-id" type="file" name="photo" class="file form-control" multiple data-preview-file-type="text" data-allowed-file-extensions='["png", "jpg"]'&gt;
                               &lt;/div&gt;
                       &lt;/li&gt;
                   &lt;/ul&gt;
                   &lt;button type="submit" class="btn form-control btn-default"&gt;Kaydet&lt;/button&gt;
                  &lt;/form&gt;
  </code></pre>
  
  <p>Output : When I select images on the page and upload them, they redirect to the same page and the images are not loaded. What do I have to do? I'm working on 2 - 3 days, but I can not find a solution.</p>