Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
blocks:app-note:publishphoto [2020-04-06 09:46]
mattias [Task]
blocks:app-note:publishphoto [2020-09-09 14:18]
admin Typo
Line 1: Line 1:
-====== Take a photo from one, publish on another spot ======+====== Take a photo and publish on Spot ======
  
-This application note shows how you can take a photo with the camera or from storage in visitor’s spot and publish the on a display spot.+This application note shows how you can take a photo using, e.g., mobile phone and then automatically publish it on a Display Spot.
  
-We will: 
- 
-  * Describe the basic principle how this is done. 
-  * Briefly describe the custom components.  
-  * Discuss the task involved and what that can be used for. 
  
 ===== Installation ===== ===== Installation =====
Line 32: Line 27:
  
 When trying this on a computer you will get a dialog asking for a photo from the local computer.  When trying this on a computer you will get a dialog asking for a photo from the local computer. 
-If running from a mobile device one will automaticly get the option to use the camera or browse for a file.+If running visitor spot on a mobile device one will automaticly get the option to use the camera or browse for a file.
  
-On the displayspot you should should see the photo you selected from the previous step. +On the display spot you should should see the photo you selected from the previous step. 
  
  
  
  
-===== Task=====+===== How does it work=====
  
-The user script Photo.js runs the task called OnPublish every time someone publishes a new photo+The block shown on the visitor spot is a custom application loaded via a web-block. The web app takes a photo and then calls the Photo.js scripts function "finish" that crops the size and uploads the file to the block and updates the block definitions. Finally, the task OnPublish is called and in the Blocks task OnPublish is called.
 This task will make sure the block is published and updated every time called.  This task will make sure the block is published and updated every time called. 
 You may use this task for any other functions required at publish.  You may use this task for any other functions required at publish. 
  
-{{:blocks:app-note:publishphoto:task.png?nolink&600|}} +{{:blocks:app-note:publishphoto:task.png?nolink&600|}} 
 + 
 +===== Supplementary studies=====
  
 +If you want to change any names of blocks or paths to blocks or task the script Photo.js and the task to update the block must be updated accordingly.  Before that, try the [[blocks:app-note:publishscribble|scribble application note.]]
 +The custom app files can be found and examined in the /public/apps/photographer/ folder.