Skip to content

Commit

Permalink
已修改 app/admin/weixin.php
Browse files Browse the repository at this point in the history
  • Loading branch information
jat001 committed May 16, 2016
1 parent 2bc9acf commit ec5fcdb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/admin/weixin.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,17 +237,21 @@ public function rule_save_action()
H::ajax_json_output(AWS_APP::RSM(null, '-1', AWS_APP::lang()->_t('上传失败, 请与管理员联系')));
}

$origin_file = get_setting('upload_dir') . '/weixin/' . 'origin_' . $upload_data['file_name'];

rename($upload_data['full_path'], $origin_file);

AWS_APP::image()->initialize(array(
'quality' => 90,
'source_image' => $upload_data['full_path'],
'source_image' => $origin_file,
'new_image' => $upload_data['full_path'],
'width' => 640,
'height' => 320
))->resize();

AWS_APP::image()->initialize(array(
'quality' => 90,
'source_image' => $upload_data['full_path'],
'source_image' => $origin_file,
'new_image' => get_setting('upload_dir') . '/weixin/square_' . basename($upload_data['full_path']),
'width' => 80,
'height' => 80
Expand Down

0 comments on commit ec5fcdb

Please sign in to comment.