holandes22 / kube-admin

An admin dashboard for Kubernetes
MIT License
6 stars 0 forks source link

Avoid parsing large files in manifest input component #47

Closed holandes22 closed 8 years ago

holandes22 commented 8 years ago

We parse files on open in order to validate them and show a preview before sending them to the backend, buut if the file is quite large we won't be able to open and might cause 100% and halt the browser/tab. This will typically happen with large binaries, manifest files should never be so large, so in the case of a large file, skip validation/preview and just catch an error from the API if it is indeed invalid