Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign updoes the 'project' kwarg work on upload and upload directory? I'm cornfused #80
Comments
|
It definitely works on |
|
There is some inconsistency with |
|
Sorry for this confusion. I'll take a look at it. Though could you please clarify what you mean when you say "link to a PDF url." |
|
Thanks! |
|
Weird. Now that's something I hadn't considered. Regardless of how you submit a document, the project keyword argument is passed along in the same format by this bit of code. The one differnece I see that is URL uploads do not use a "multipart" post handler to pass along all that PDF data. Though I'm not sure that should make much difference. Can you provide some examples of the code you're running that's not working? Are there error messages? |
|
I've been running into an ish when I try to upload to a specific project. Here's the function I'm calling:
I'm not getting any errors, and the document uploads fine -- it's just not attached to the project I specified. I've confirmed that the string I'm passing for the project matches the name of the project on DC. I also tried fetching the project first -- |
|
What are you passing in as the |
|
The project name as a string. E.g.: |
|
According to the official API documentation, DocumentCloud expected the "numeric Project id" for that input. Try that and see if that works. |
|
Bingo. Thanks. |
|
This is something we should spell out more clearly in the documentation. I'm curious where you looked that failed to make this need clear. |
|
Documents >> uploading. My though process was: if you can fetch a project by either its ID or title, maybe you could also post to one in the same way. (I might add a few lines to my function to fetch the project by name and return the ID.) |
|
yeah that's a pretty reasonable thing to think. I wonder if we should be testing if an object is submitted, and if so pulling the ID. |
No description provided.