bcgov / bcwild

Wildlife Datacapture App
Apache License 2.0
1 stars 1 forks source link

Uploading photos #26

Closed stanislav-kondratev-dsr-corporation closed 1 year ago

stanislav-kondratev-dsr-corporation commented 1 year ago

Problem state: Images are not uploaded from the Bat Survey and Aerial Telemetry screens.

Problem reason: Uploading images is not implemented neither on FE nor on BE.

Detected in the branch: main

Conditions to reproduce the issue: Create a bat survey or fill in the aerial telemetry form, attach images to them, and push the changes to the server. Images are not saved anywhere.

Possible workarounds without the fix: No workarounds.

Changes: BE: endpoint /image/upload for uploading an arbitrary number of images. Uploaded images are saved under random names. Currently, they are stored in uploads/images under app's working directory. FE: Before the records are sent to the server, a first pass is performed. Looping over the records, for each record its images are uploaded, and the record is "fixed" in the sense that image objects are replaced by file names of saved images returned from the server. Subsequently, "fixed" records are pushed to the server.

A minor unrelated change: automatic pulling the bridges and animals is added to the Login screen.

Committed into: 98d9d088f46e9005adebdb4dec8d1ccf8c551fbe

Risk factors: Syncing the records and logging in may be affected.

Risk: Medium