Skip to content

Commit

Permalink
[xfwang] 'filename' should be basename rather than a path
Browse files Browse the repository at this point in the history
  • Loading branch information
devtrac committed Apr 1, 2012
1 parent 720328a commit 2df5476
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions script/d7
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ echo "session_id = $session_id"

cookie="$session_name=$session_id"

image_path="script/site_image.png"
image_name="site_image.png"
image_path="./script/${image_name}"
image_data_file="${image_path}.data"

openssl enc -base64 -in $image_path | tr -d '\n' > "$image_data_file"

image_size=`cat ${image_path}.data | wc -c | tr -d ' \n'`

post_data="uid=$user_id&filesize=$image_size&filename=$image_path"
post_data="uid=$user_id&filesize=$image_size&filename=$image_name"

echo

Expand Down

0 comments on commit 2df5476

Please sign in to comment.