aboutsummaryrefslogtreecommitdiff
path: root/captain/special.f90
diff options
context:
space:
mode:
Diffstat (limited to 'captain/special.f90')
-rw-r--r--captain/special.f9034
1 files changed, 34 insertions, 0 deletions
diff --git a/captain/special.f90 b/captain/special.f90
index 553378e..4d8640f 100644
--- a/captain/special.f90
+++ b/captain/special.f90
@@ -129,4 +129,38 @@ contains
end function get_full_filename_from_request
+ subroutine report_upload(req)
+ use captain_db
+ use server_response
+ use logging
+ implicit none
+
+ class(request), intent(in)::req
+ integer::job_id, ierr
+ character(len=:), pointer:: job_text
+
+ character(256)::first
+ character(1024)::remaining
+ integer::i
+
+ job_text => req%q%get_value("job")
+ call write_log("jobtext: "//trim(job_text))
+ if(associated(job_text)) then
+ read(job_text, *, iostat=ierr) job_id
+ if(ierr == 0) then
+ call write_log("jobid ok")
+ call req%path_component(1, first)
+ i = index(req%location, trim(first))
+ i = i + len_trim(first) + 1
+ remaining = req%location(i:len_trim(req%location))
+
+
+ call write_log("Writing job upload for: "//trim(first)//" -> "//trim(remaining))
+ call add_job_upload_db(job_id, trim(first), trim(remaining))
+
+ end if
+ end if
+
+ end subroutine report_upload
+
end module special_filenames