Add a new endpoint /api/scans to post scans (images). The scans are saved in the project directory according to the current file pattern.
I couldn't identify a clear pattern in the design of the current API endpoints so I designed the new endpoint as a REST API because we are already using it at molflow for other projects and there is plenty of resources and tools for it. I suggest that future endpoint should also use REST.
There is already code in Scan-o-Matic that saves scan images. I did try to refactor this to use the same code as the new endpoint but the image-saving code is quite entangled in the scanning "effector" which proved quite painful to get under tests. Or understand.
Coverage increased (+0.2%) to 40.159% when pulling 22d07933b957f93a1419d15f78c4b2ef6a4cc79f on gdetrez:image-upload-endpoint into 3d0452ce575139c0292dee37b6ba52ad717d0a27 on Scan-o-Matic:master.
Coverage increased (+0.2%) to 40.154% when pulling 6e1713ff5a2e3ce0aa49bbb8d0a79eb82fb2fad0 on gdetrez:image-upload-endpoint into 3d0452ce575139c0292dee37b6ba52ad717d0a27 on Scan-o-Matic:master.
Add a new endpoint
/api/scans
to post scans (images). The scans are saved in the project directory according to the current file pattern.I couldn't identify a clear pattern in the design of the current API endpoints so I designed the new endpoint as a REST API because we are already using it at molflow for other projects and there is plenty of resources and tools for it. I suggest that future endpoint should also use REST.
There is already code in Scan-o-Matic that saves scan images. I did try to refactor this to use the same code as the new endpoint but the image-saving code is quite entangled in the scanning "effector" which proved quite painful to get under tests. Or understand.