Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structured filenames post image error #10

Open
stteem opened this issue Mar 1, 2022 · 3 comments
Open

Structured filenames post image error #10

stteem opened this issue Mar 1, 2022 · 3 comments

Comments

@stteem
Copy link

stteem commented Mar 1, 2022

Post request to the endpoint "https://api.opencdms.org/climsoft/v1/file-upload/image" responds with status code 422 Unprocessable Entity and message "field is required". It means that the endpoint can't process the post request due to a missing field/value perhaps.

The post request contains 1 or multiple image/PNG or JPG files with structured filenames of format "StationID-FormID-YYYYMMDDHH".

API documentation should detail expected Post request body.

climsoft
.

@isedwards
Copy link
Member

@stteem - This should now be resolved, could you test and let us know?

@stteem
Copy link
Author

stteem commented Mar 3, 2022 via email

@stteem
Copy link
Author

stteem commented Mar 3, 2022

It works perfectly. Thanks

Except it seems the endpoint doesn't process multiple files, the response has only 1 filepath in the result array irrespective of the number of files posted. I thought the number of results in the result array would equal the number of files posted.

clims

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants