Closed ebremer closed 7 years ago
It actually is handled, however, when uploading a image with a duplicate Image Id, it will take some time before the process times out before error handler fires and displays a message. @sharmaashish can the server respond back faster?
maybe the upload form should make an API call to see if it can fetch the image metadata before attempting an upload
api/Data/osdMetadataRetriever.php
We also should check if the image id is already in the database and return an error to the user if it is.
Ashish, do you have a sample of how this API is called?
https://github.com/camicroscope/caMicroscope/blob/StonyBrook/osdCamicroscope.php#L120
and
caMicroscope/js/imagemetadatatools/osdImageMetadata.js
@sharmaashish there was a cross-site issue using the above API so I just solved it for the 31st using FindAPI which is setup already to allow cross-site. We can change the mechanism post-31. However, although we need a client check to avoid sending image data before find the duplicate Image ID, the server should handle it better than it is.
Not the post, but a back-end failure which is reported via json on successful http post