solgenomics / sgn

The code behind the Sol Genomics Network, Cassavabase and other Breedbase websites
https://solgenomics.net
MIT License
66 stars 35 forks source link

Images upload #4832

Open MitanshuShaBa opened 9 months ago

MitanshuShaBa commented 9 months ago

Expected Behavior

When I am uploading a new image, I want to add some additional information along with it.

I am make a POST request on this link: https://demo.breedbase.org/brapi/v2/images With this body:

[
  {
    "additionalInfo": {
      "tags": ["string"],
      "observationUnitName": "string",
      "additionalProp3": "string"
    },
    "imageFileName": "image_0000231.jpg",
    "imageFileSize": 50000,
    "imageHeight": 550,
    "imageName": "Tomato Image 1",
    "imageWidth": 700,
    "mimeType": "image/jpeg",
    "description": ""
  }
]

But in response I get the image created with the additionalInfo containing:

"additionalInfo": {
    "observationLevel": null,
    "observationUnitName": null,
    "tags": []
}

Due to some issue this is not storing the additionalInfo being sent.

For Bugs:

Environment

This is experienced on demo.breedbase.org website.

Steps to Reproduce

Create a POST request on the breedbase instance on /images route with the given body.

MFlores2021 commented 6 months ago

@MitanshuShaBa I'm wondering what would you like to store as "additionalProp3". Storing TAGs is available at the moment.

MFlores2021 commented 5 months ago

According to Prasad pkamath3@ncsu.edu They need to store trialDbId