Hi,
I am trying to copy the recorded files to an S3 bucket and its not working and I have not been able to figure out whats wrong with it. So far I have tried following:
1) I know my hook is getting called because I have a test script in it which copies the file in records folder with a new name. Thats working.
2) If I manually call ./S3-AWS4-Upload.sh $2 that copies the file to s3 correctly.
Below is the code of my hook.
I have also tried few variations of the
1) sudo ./S3-AWS4-Upload.sh $FILE_PATH
2) ./S3-AWS4-Upload.sh $FILE_PATH
3) chmod +x S3-AWS4-Upload.sh
./S3-AWS4-Upload.sh $FILE_PATH
Manually calling ./S3-AWS4-Upload.sh /usr/local/FlashphonerWebCallServer/records/MdoQ22zaTFDu1551796198938-315859e0-3f53-11e9-a002-15436f32bb6b.mp4 uploads the file on s3
Log file which gets created have the following text in it
Sent to S3. /usr/local/FlashphonerWebCallServer/records/MdoQ22zaTFDu1551796198938-315859e0-3f53-11e9-a002-15436f32bb6b.mp4
Any ideas?
I am trying to copy the recorded files to an S3 bucket and its not working and I have not been able to figure out whats wrong with it. So far I have tried following:
1) I know my hook is getting called because I have a test script in it which copies the file in records folder with a new name. Thats working.
2) If I manually call ./S3-AWS4-Upload.sh $2 that copies the file to s3 correctly.
Below is the code of my hook.
Code:
# This script copies a recorded stream to client/records
STREAM_NAME=$1
SRC_FILE=$2
SRC_DIR="/usr/local/FlashphonerWebCallServer/records/"
REPLACE_STR="/usr/local/FlashphonerWebCallServer/records/NewName-$STREAM_NAME-"
DST_FILE="${SRC_FILE/$SRC_DIR/$REPLACE_STR}"
cp $SRC_FILE $DST_FILE
FILE_PATH=$2
sudo ./S3-AWS4-Upload.sh $FILE_PATH
echo "Record complete. Sent to S3. $FILE_PATH" >>/usr/local/FlashphonerWebCallS$
1) sudo ./S3-AWS4-Upload.sh $FILE_PATH
2) ./S3-AWS4-Upload.sh $FILE_PATH
3) chmod +x S3-AWS4-Upload.sh
./S3-AWS4-Upload.sh $FILE_PATH
Manually calling ./S3-AWS4-Upload.sh /usr/local/FlashphonerWebCallServer/records/MdoQ22zaTFDu1551796198938-315859e0-3f53-11e9-a002-15436f32bb6b.mp4 uploads the file on s3
Log file which gets created have the following text in it
Sent to S3. /usr/local/FlashphonerWebCallServer/records/MdoQ22zaTFDu1551796198938-315859e0-3f53-11e9-a002-15436f32bb6b.mp4
Any ideas?
Last edited: