Skip to content

Commit

Permalink
4.9
Browse files Browse the repository at this point in the history
* 修复打开图片可能会下载的问题
  • Loading branch information
xiaomac committed Mar 6, 2020
1 parent 712103a commit 8fbe958
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lib/mimetypes.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class OSSMimeTypes {
'bmp' => 'image/bmp',
'gif' => 'image/gif',
'ief' => 'image/ief',
'png' => 'image/png',
'png' => 'image/jpg',

This comment has been minimized.

Copy link
@Stark-X

Stark-X Jun 17, 2020

请问这里为什么要换成 'image/jpg'

This comment has been minimized.

Copy link
@xiaomac

xiaomac Jun 18, 2020

Author Owner

我理解这是OSS解析图片格式时的一个bug吧。经测试这样改之后,可以解决点击图片会下载的问题。

'wbmp' => 'image/vnd.wap.wbmp',
'ras' => 'image/x-cmu-raster',
'pnm' => 'image/x-portable-anymap',
Expand Down Expand Up @@ -163,9 +163,9 @@ class OSSMimeTypes {
'iges' => 'model/iges',
'igs' => 'model/iges',
'jp2' => 'image/jp2',
'jpe' => 'image/jpeg',
'jpeg' => 'image/jpeg',
'jpg' => 'image/jpeg',
'jpe' => 'image/jpg',
'jpeg' => 'image/jpg',
'jpg' => 'image/jpg',
'kar' => 'audio/midi',
'lha' => 'application/octet-stream',
'lzh' => 'application/octet-stream',
Expand Down
2 changes: 1 addition & 1 deletion oss-upload.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
* Plugin Name: OSS Upload
* Version: 4.8.9
* Version: 4.9
* Description: Upload with Aliyun OSS, with modified OSS Wrapper and fully native image edit function support.
* Plugin URI: https://www.xiaomac.com/oss-upload.html
* Author: Link
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Contributors: Link
Donate link: https://www.xiaomac.com/about
Tags: aliyun, oss, upload, media, files, storage, cloud, 阿里云, 媒体库, 图片, 上传, 云存储
Tested up to: 5.3.2
Stable tag: 4.8.9
Stable tag: 4.9

== Description ==

Expand Down Expand Up @@ -42,6 +42,9 @@ None

== Changelog ==

= 4.9 =
* 修复打开图片可能会下载的问题

= 4.8.9 =
* 修复个别主题会严重报错的问题

Expand Down

0 comments on commit 8fbe958

Please sign in to comment.