mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-28 02:11:40 +00:00
Allow file uploads of any size and better report active cameras in PhotonCamera error print (#1298)
Previously reported itself which was confusing. New print: ``` Error at org.photonvision.PhotonCamera.verifyVersion(PhotonCamera.java:378): Found the following PhotonVision cameras active on NetworkTables: ==> HD_Pro_Webcam_C920 ==> Arducam_OV9281_USB_Camera ```
This commit is contained in:
@@ -65,10 +65,6 @@ public class Server {
|
||||
corsContainer.add(CorsPluginConfig::anyHost);
|
||||
});
|
||||
|
||||
// Increase the upload size limit (arbitrary, but need to be able to deal with large
|
||||
// calibration JSONs)
|
||||
javalinConfig.http.maxRequestSize = (long) (50 * 1e6);
|
||||
|
||||
javalinConfig.requestLogger.http(
|
||||
(ctx, ms) -> {
|
||||
StringJoiner joiner =
|
||||
@@ -77,6 +73,12 @@ public class Server {
|
||||
.add(ctx.req().getMethod())
|
||||
.add("from endpoint")
|
||||
.add(ctx.path())
|
||||
.add("of req size")
|
||||
.add(Integer.toString(ctx.contentLength()))
|
||||
.add("bytes & type")
|
||||
.add(ctx.contentType())
|
||||
.add("with return code")
|
||||
.add(Integer.toString(ctx.res().getStatus()))
|
||||
.add("for host")
|
||||
.add(ctx.req().getRemoteHost())
|
||||
.add("in")
|
||||
|
||||
Reference in New Issue
Block a user