mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-12 09:00:40 +00:00
Only reveal hashids to the ui
This commit is contained in:
@ -24,8 +24,8 @@ def service(service):
|
||||
# Check if the requested service exist
|
||||
if service not in SERVICES or service not in AddJobForms:
|
||||
abort(404)
|
||||
version = request.args.get('version',
|
||||
SERVICES[service]['versions']['latest'])
|
||||
version = request.args.get(
|
||||
'version', SERVICES[service]['versions']['latest'])
|
||||
if version not in SERVICES[service]['versions']:
|
||||
abort(404)
|
||||
form = AddJobForms[service](prefix='add-job-form', version=version)
|
||||
@ -44,7 +44,7 @@ def service(service):
|
||||
service_args.append('-l {}'.format(form.language.data))
|
||||
if form.binarization.data:
|
||||
service_args.append('--binarize')
|
||||
job = Job(creator=current_user,
|
||||
job = Job(user=current_user,
|
||||
description=form.description.data,
|
||||
service=service, service_args=json.dumps(service_args),
|
||||
service_version=form.version.data,
|
||||
@ -65,7 +65,8 @@ def service(service):
|
||||
else:
|
||||
for file in form.files.data:
|
||||
filename = secure_filename(file.filename)
|
||||
job_input = JobInput(filename=filename, job=job)
|
||||
job_input = JobInput(
|
||||
filename=filename, job=job, mimetype=file.mimetype)
|
||||
file.save(job_input.path)
|
||||
db.session.add(job_input)
|
||||
job.status = 'submitted'
|
||||
|
Reference in New Issue
Block a user