|
|
@ -1489,12 +1489,17 @@ container implementation.
|
|
|
|
|
|
|
|
|
|
|
|
#### Uploading files
|
|
|
|
#### Uploading files
|
|
|
|
|
|
|
|
|
|
|
|
There are two cases when users need to upload files using the API – submitting
|
|
|
|
There are two cases when users need to upload files using the API -– submitting
|
|
|
|
solutions to an assignment and creating a new exercise. In both of these cases,
|
|
|
|
solutions to an assignment and creating a new exercise. In both of these cases,
|
|
|
|
the final destination of the files is the fileserver.
|
|
|
|
the final destination of the files is the fileserver. However, the fileserver is
|
|
|
|
|
|
|
|
not publicly accessible, so the files have to be uploaded through the API.
|
|
|
|
However, the fileserver is not publicly accessible, so the files have to be
|
|
|
|
|
|
|
|
uploaded through the API.
|
|
|
|
The files can be either forwarded to the fileserver directly, without any
|
|
|
|
|
|
|
|
interference from the API server, or stored and forwarded later. We chose the
|
|
|
|
|
|
|
|
second approach, which is harder to implement, but more convenient -- it lets
|
|
|
|
|
|
|
|
exercise authors double-check what they upload to the fileserver and solutions
|
|
|
|
|
|
|
|
to assignments can be uploaded in a single request, which makes it easy for the
|
|
|
|
|
|
|
|
fileserver to create an archive of the solution files.
|
|
|
|
|
|
|
|
|
|
|
|
@todo permission handling, roles, etc.
|
|
|
|
@todo permission handling, roles, etc.
|
|
|
|
|
|
|
|
|
|
|
|