I made a process that jumps to another URL after the Upload button of the image is pressed.
I was able to jump to another URL, but how can I skip it in a new tab or window?
The jump destination URL is appropriate.
#-coding utf8-- from bottle import route, run, template, request, static_file, url, get, post, response, error, abort, redirect, os, redirect, HTTPResponse from time import strftime @get ('/ upload') def upload (): return '' ' <form action = "/ upload" method = "post" enctype = "multipart/form-data"> <input type = "submit" value = "Upload"></br> <input type = "file" name = "upload"></br> </form> '' ' @route ('/ upload', method = 'POST') def do_upload (): When #upload button is pressed r = HTTPResponse (status = 302) r.set_header ('Location', 'http: // localhost: 8080/top') #Redirect destination url return r run (host = 'localhost', port = 8080)
Answer # 1
Is this expected behavior by adding
target = _blankto the prepared form tag?
@get ('/ upload') def upload (): return '' ' <form action = "/ upload" method = "post" target = "_ blank" enctype = "multipart/form-data"> <input type = "submit" value = "Upload"></br> <input type = "file" name = "upload"></br> </form> '' '
- python - i want to avoid "no response" when pressing gui button in pyqt
- i want to get new comments one after another with python scraping what is the quickest way to do this?
- xcode - after moving the file to another mac, i can no longer implement it
- python 3x - python, selenium, radio button cannot be selected
- vbnet - how to get the text of another button when you click the button
- [python/ttk] button background color bug
- python - freeze after destroyallwindows() runs
- python - about the list when calling a function in another file
- the code stopped working after removing old python
- python - [django] about access from another terminal in lan
- python 3x - the process loops while pressing the key in keypressevent
- python - to exit the loop after an hour
- python 3x - i want to run another python script from a python script
- how to call another method in the same class from a method in a python class
- python - i don't know how to restore the image after projection conversion because the color is grayscale (?)
- error when inserting after rewriting list contents in python
- about import from another directory in python
- i want to close the textbox after getting the value with python tkinter
- php - inquiry form what to do if you can't get back by pressing the back button
- python - if a specific button (eg root) is pressed, execute the process that was stopped
- python 3x - typeerror: 'method' object is not subscriptable
- python - you may need to restart the kernel to use updated packages error
- xcode - pod install [!] no `podfile 'found in the project directory
- vuejs - [vuetify] unable to locate target [data-app] i want to unit test to avoid warning
- android studio - emulator: dsound: could not initialize about the error message directsoundcapture
- android studio - unresolved reference comes out in kotlin
- mysql startup failed [error] innodb: the innodb_system data file 'ibdata1' must be writable
- django - oserror: [winerror 123] the file name, directory name, or volume label syntax is incorrect : '<frozen importlib_boot
- python - importerror: cannot import name md5 error cannot be resolved