2 Replies Latest reply on May 27, 2013 2:46 AM by Luca Priano

    Problem displaying images captured by camera

    Luca Priano

      Hi guys,

       

      I'm trying to display into my view an image captured by camera, but I can't see the captured image in my img tag. I simply send the image_uri of the image (@params['img_uri']) to the view but I'm probably wrong on setting it into src attribute.

       

      Here is my controller:

       

       

        def camera_callback

       

          if @params['status'] == 'ok'

       

            WebView.navigate(url_for :action => :go, :query => {:img_uri => @params['image_uri']}) 

            ""     

          end

       

        end


       

        def go

       

          render

       

        end


       

      Here where I set the uri into my go.erb file:

       

        <img src="<%= @params['img_uri'] %>" width="100%" height="100%"></img>   

       

      @params['img_uri'] contains the correct uri (it isn't empty, it contains "db/db-files/Image_20135515844441118.jpg")...but the image isn't displayed! 

       

      Any clue where I'm wrong / missing?

       

      Where is located the image we capture by camera ( the file db/db-files/Image_20135515844441118.jpg ) into the device's filesystem?

       

      Thanks in advance for any hint!!!