Method to download submission attachment (S3) urls from ODK Central#342
Conversation
for more information, see https://pre-commit.ci
|
I realised I made an error in the submission attachment URLs in my pyodk fork! Original: _submission: str = "projects/{project_id}/forms/{form_id}/submissions/{{instance_id}}"
list: str = f"{_submission}/attachments"
get: str = f"{_submission}/attachments/{{fname}}"
post: str = f"{_submission}/attachments/{{fname}}"
delete: str = f"{_submission}/attachments/{{fname}}"fixed: _submission: str = "projects/{project_id}/forms/{form_id}/submissions/{instance_id}"
list: str = f"{_submission}/attachments"
get: str = f"{_submission}/attachments/{{fname}}"
post: str = f"{_submission}/attachments/{{fname}}"
delete: str = f"{_submission}/attachments/{{fname}}"The key here is that double curly braces are used in f-strings, but the If you remove |
|
The functionality works, but the tests are quite complex and have issues. It was suggested we merge for now to get integrating this into FMTM, then retroactively fix the tests 👍 |
|
@Anuj-Gupta4 can I make a release based on this code do you think? |
|
I think the functionality itself is good to go. 👍 |
Added and refactored submission related functionalities.
Test cases still need more work.