2 Replies Latest reply on Feb 7, 2015 7:35 AM by rgb

    opening image through webserver


      i have been told that if you put the files in the right folder and open the ip address of your galileo in your browser, you’ll see the files.

      can anyone guide me on this

        • 1. Re: opening image through webserver

          Hi annu_shah


          I just tried this. First, create a new test.js file with this code:

          You need to change the X's with IPaddress of your board and  in /home/test/Capture.PNG the path of your image. If you are not using a .png image, you need to change the Content-Type': 'image/png' for the respective one.

          var http = require('http')
            , fs = require('fs');
          fs.readFile('/home/test/Capture.PNG', function(err, data) {
            if (err) throw err; 
            http.createServer(function(req, res) {
              res.writeHead(200, {'Content-Type': 'image/png'});
            console.log('Go to http://XXX.XXX.XX.XXX:81 and see the Capture.PNG');


          Now, run the code with:

          root@clanton:~# node test.js

          And go to your browser and access to your IP address: XXX.XXX.XX.XXX:81


          Let me know if works for you




          • 2. Re: opening image through webserver

            Hi Annu_Shah

            Unlike the Arduino Yun, the Galileo doesn't have a web server running by default.

            As CMata mentioned you can create a web server using one of the programming languages - Node.js or Python, or you can install a web server.

            I outlined how you can install Flask, a Python based web server here


            Since it is written in Python you can use the Wiring_x86 library from EmuTek and display information from sensors, pictures taken with a web cam and control the GPIO pins. See the example for WebLamp