************************************************************
INSTALATION OF WEBUPLOAD SCRIPT FOR webOS synoFM application
************************************************************


ABOUT
------

This script will allow synoFM application to upload files from your phone/touchpad to Synology NAS. 
Due to combination of webOS and Synology bugs, it's not possible to upload files directly to NAS.
This script will receive file you pick to upload and send it to NAS. 
If you ask how can script upload files to NAS, if there's no username and password in it. 
Username and password to your NAS are sended from synoFM application encrypted with AES 256bit (safe enough).

Recomendation: I recomends to use this scrit with some external web server (web page).


INSTALATION
-----------

1.1) Extract acrchive. It will create folder named "synoupload" with this files:

aes.class.php    - AES decoding library
aesctr.class.php - AES decoding library - these libraries will help to decrypt your username/password
cacert.pem       - list of certificate authorities - if CURL have old one
cleanTemp.php    - script to empty temp folder
index.php        - this is transmitting script (here you can check what is happening there :)


1.2) edit "index.php" script with notepad and set your NAS url/ip address and port. If you want you can change password for decryting your credentials.

NOTE:
If you are using NAS only on your home network and you have no connection from outside you have to enable in control panel of your NAS,
Web Station module and copy "synoupload" folder to NAS (/web/synoupload folder). Then you have to set NAS_url parameter to "http://localhost"


1.3) copy extracted "synoupload" directory to your web server (web page) via FTP, SFTP ... etc.

1.4) grand permissions to folder "synoupload" to write (chmod 777)


APPLICATION PREFERENCES
-----------------------

2.1) enable "WEBuploading" switch
2.2) set web address of webpage where synoupload script is located (http://mypage.com/synoupload)
2.3) If you have own crypting pass password set in 1.2 script installation, you have to set same password for crypting.



In case any problems, contact me at:

http://forums.precentral.net/webos-development/300211-new-app-synology-file-manager.html