A small, simple yet powerful script which will watch a folder (or folders recursively) and move the incoming file with png extension to Azure blob storage.
- This script servers as an example of use case where you need to monitor a folder for incoming files and perform "action" on them. For example, you may need to create thumbnails for any image uploaded by a website user.
-
To set this up and running is pretty easy. Once you have the code, install the depency packages and you are good to go!
-
Configuration
- Edit src/process.sh and set the variable to POST file to the azure destination
CONTAINER_URL="<your azure container URL+SAS token>";
-
Dependencies
- Install inotify-tools
sudo apt-get install inotify-tools
-
Deployment instructions
- start monitoring the folder
sh startmonitoring.sh
Note that you can start monitoring using the inoticoming command as a daemon also. Once any file ending wiht
png
extension comes toincoming
folder, it will be copied to the azure blob storage and then moved toprocessed
folder.
- Writing tests
- Code review
- Other guidelines
- Repo owner or admin
- Other community or team contact