I'm getting error when saving image snap shot

The data could not be saved, because the destination is invalid. More information is available in the system log.
There was an error when attempting to save your snapshot. Please try again, or contact the site administrator.
Notice: Trying to get property of non-object in media_webcam_widget_element_process() (line 190 of /srv/www/website/sites/all/modules/media_webcam/media_webcam.module).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

antonegorov’s picture

Hi, found a solution?

BeaPower’s picture

any solution? Webcam is not recording anything...

BeaPower’s picture

still not working... any updates. Is Red5 required to get it working?

ryantollefson’s picture

Same issue here (just trying to do snapshot, no video).

g089h515r806’s picture

same issue

BeaPower’s picture

any updates?

medienverbinder’s picture

same issue here:

The data could not be saved, because the destination is invalid. More information is available in the system log.
There was an error when attempting to save your snapshot. Please try again, or contact the site administrator.
Notice: Trying to get property of non-object in media_webcam_widget_element_process() (line 190 of /www/htdocs/sites/all/modules/media_webcam/media_webcam.module).

The input field (class="media-webcam-snap-textarea") contains the value "data:image/jpeg;base64,......".
I can manually decode and get the picture. The recording does so, however, the image cannot be saved as a file.

Thanks !

jazznight17’s picture

same issue :
the problem seems to be $path var from line if ($file->filepath = file_save_data($base64, $path .'/media-webcam-image-'. time() .'.jpg')) {...

if i replace $path by $destination so file is recorded on server but doesn't appear on save node.

could you help please ?

thanks

jazznight17’s picture

same issue :
the problem seems to be $path var from line if ($file->filepath = file_save_data($base64, $path .'/media-webcam-image-'. time() .'.jpg')) {...

if i replace $path by $destination so file is recorded on server but doesn't appear on save node.

could you help please ?

thanks

Dave.Ingram’s picture

Just confirming that #8 is definitely a step in the right direction. Replacing $destination with $path on line 267 in the current dev version gets a step closer, but still wasn't saving for me.

As I'm not in need of video, I'm moving over to a sandbox module that uses a jQuery plugin to capture only images:
http://drupal.org/sandbox/ooystein/1616836

totolearn’s picture

Getting the same problem at current Dev version? Any process or anyone find the solution?

I also tried #10's sandbox/ooystein/1616836 but crash the 7.23 core settings.

We just need to capture photo from webcam, no video needed. TIA for anyone can point to other directions!!

LGLC’s picture

Looks like the code isn't handling the file saving correctly when saving images. I've written a patch to address the issue.

LGLC’s picture

Issue summary: View changes
FileSize
1.48 KB

Looks like the code isn't handling the file saving correctly when saving images. I've written a patch to address the issue.

Apologies for the double post!

chuta’s picture

FileSize
65.19 KB
3.25 KB

I got this module to work perfectly, though it will be great to write a new display format for it to display files as image. I have attached a screen shot to show the file path configurations. Just download the attached module to replace the one that came originally with it. The patch is already applied with minimal changes. Enjoy!