hello
does anybody uses filepicker.io?
Its allows you to save files in the cloud.
I have a need to capture the image directly from a webcam and filepicker
has the option to grab image from webcam.
It return an url of the image stored in filepicker.


I dont know how to use it do replace the standard "get file" button


here is my code just for testing purposes i add my captured image to the
end of body.
I want to save it to my table instead


{{response.files.append(URL(r=request,c='static',f='/js/filepicker.js'))}}
{{extend 'layout.html'}}
   <script type="text/javascript">
        jQuery(document).ready(function(){
            filepicker.setKey('youhavetogetakey');
            document.getElementById("getLink").onclick = function(){
                filepicker.pick({
    mimetypes: ['image/*', 'text/plain'],
    container: 'window',
    services:[ 'WEBCAM'],
  },function(fpfile) {
                    console.log(fpfile.url);
                    var img = document.createElement("img");
                        img.setAttribute("src", fpfile.url);
                        img.setAttribute("alt", fpfile.filename);
                        img.setAttribute("title", fpfile.filename);
                        jQuery('body').append(img);
                });
            };
        });
    </script>
    <div class="container">
        <div class="row">
            <button id="getLink" class="btn btn-large btn-primary
btn-jumbo">Tirar Foto</button>
            <img src
        </div>
    </div>


Help pleaseeeeeeeeeeeee

-- 



Reply via email to