caltechlibrary / caltechdata_api

Python library for using the CaltechDATA API
Other
10 stars 2 forks source link

Support addition of multiple files #28

Open tmorrell opened 5 months ago

tmorrell commented 5 months ago

Direct file upload should include multiple files

tmorrell commented 4 months ago

The cli should ask if users want to keep their existing files. This will require an additional get like https://github.com/caltechlibrary/caltechdata_api/blob/affa5b2aa4661854eb567cd586655dbefdfed701/caltechdata_api/cli.py#L492 but to /api/records/sbhrt-m4b64/files without the accept header.

You'll also need to add a new, optional keep_file parameter to https://github.com/caltechlibrary/caltechdata_api/blob/affa5b2aa4661854eb567cd586655dbefdfed701/caltechdata_api/caltechdata_write.py#L12 and https://github.com/caltechlibrary/caltechdata_api/blob/affa5b2aa4661854eb567cd586655dbefdfed701/caltechdata_api/caltechdata_edit.py#L52 that will be checked here https://github.com/caltechlibrary/caltechdata_api/blob/affa5b2aa4661854eb567cd586655dbefdfed701/caltechdata_api/caltechdata_write.py#L61 to be excluded from the deletion step.