Skip to content

Commit

Permalink
switch UPLOAD_FILES to local variable
Browse files Browse the repository at this point in the history
  • Loading branch information
YuWei-CH committed Dec 2, 2024
1 parent 896e248 commit a43f7e6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
app.secret_key = 'development key'

UPLOAD_FOLDER = './uploads'
# The type of file that needs to be uploaded to the server by user.
UPLOAD_FILES = {'in_fasta': None, 'in_gff': None}

# Route for submitting data on the production site.
@app.route('/', methods=['GET', 'POST'])
def submit():
# The type of file that needs to be uploaded to the server by user.
UPLOAD_FILES = {'in_fasta': None, 'in_gff': None}
form = SubmitJob(request.form)
# Validate user input according to the validation rules defined in forms.py.
if request.method == 'POST' and form.validate():
Expand Down Expand Up @@ -138,7 +138,8 @@ def submit():
# Route for submitting data on the test site
@app.route('/test', methods=['GET', 'POST'])
def submit_test():

# The type of file that needs to be uploaded to the server by user.
UPLOAD_FILES = {'in_fasta': None, 'in_gff': None}
# Path for local files
DEFAULT_FILES = {
'ref_fasta': './staticData/ref/test-ref.fa',
Expand Down

0 comments on commit a43f7e6

Please sign in to comment.