sbtools icon indicating copy to clipboard operation
sbtools copied to clipboard

item_upload_create should support an arg for "title"

Open jordansread opened this issue 10 years ago • 6 comments

right now it creates the item with the same name as the file.

jordansread avatar Apr 03 '15 18:04 jordansread

Note, this needs to be handled by including JSON as part of the body of the request, as per (this documentation)[https://my.usgs.gov/confluence/display/sciencebase/Uploading+Files+to+ScienceBase]. But before that will work, #39 needs to be figured out.

lawinslow avatar Apr 11 '15 23:04 lawinslow

gotcha. ok, that makes sense.

jordansread avatar Apr 11 '15 23:04 jordansread

Hmm, played around with this a bit - can't get a title sent through the query either in query args or in the body...

sckott avatar Sep 09 '15 23:09 sckott

Did you see this in the docs?

The parts consist of files, each of which is named "file" and a sbJSON part which is named item. With these parts you can upload as many files as you wish as well as creating (or updating) with sbJSON.

Did you try creating a JSON file with the title parameter in it and include it as part of the upload?

lawinslow avatar Sep 10 '15 16:09 lawinslow

hmm, maybe not, can try

sckott avatar Sep 10 '15 16:09 sckott

This issue is also related to #39. Title needs to be provided as part of a JSON file written out and included in the upload. This support has been challenging for the issues laid out in #39.

lawinslow avatar Dec 30 '15 15:12 lawinslow