SFULibrary / islandora_rest_ingester

Command-line tool for ingesting objects via the Islandora REST interface
The Unlicense
3 stars 0 forks source link

Allow ingester to autodetect maximum file size for POSTing if server provides that information #19

Open mjordan opened 6 years ago

mjordan commented 6 years ago

The ingester's --max_file_size option allows the user to define the maximum size, in MiB, of datastream files that the ingester will POST to the server. The Islandora REST Extras utility module provides a basic /describe endpoint that supplies the following response:

{
   "max_datastream_file_size":"500M"
}

The Ingester should hit the /describe endpoint, and if it gets a 200, use the value provided there. If it gets another response, it should take the value provided in the --max_file_size option. In both cases, which option is used should be logged.