Skip to main content

Posts

Showing posts from December, 2021

PHP Live documentation - documentation as code

  https://whoisryosuke.com/blog/2018/adding-auto-generated-docs-to-laravel-api-kushy/ Thoughwork seem to be a slang word or something like funny, mocking of 'thoughtwork' Braindump some tool here: Auto gen doc like laravel cli, swagger, phpdcd (dead code scan)... https://developers.redhat.com/blog/2017/06/21/documentation-as-code#definition___still_a_new_concept_ https://blog.stoplight.io/generate-documentation-from-code

jQuery fileupload BlueImp base64 encoding before send

  https://github.com/blueimp/jQuery-File-Upload/issues/2924 <input id="inputFileToLoad" type="file" onchange="encodeImageFileAsURL();" /> <div id="imgTest"></div> <script type="text/javascript" src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script type='text/javascript'>   function encodeImageFileAsURL() {     var filesSelected = document.getElementById("inputFileToLoad").files;     if (filesSelected.length > 0) {       var fileToLoad = filesSelected[0];       var fileReader = new FileReader();       var srcData = null;       fileReader.onload = function(fileLoadedEvent) {         var srcData = fileLoadedEvent.target.result; // <--- data: base64         var newImage = document.createElement('img');         newImage.src = srcData;         document.getElementById("im...