Giter VIP home page Giter VIP logo

qiniu-file-for-typecho's People

Contributors

yaobo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

qiniu-file-for-typecho's Issues

无法启用插件的BUG报告,对上传文件功能的一些疑问,以及静态文件cdn的建议

1.在Github上直接下载下来的版本(master)上传到网站上,点下启用插件就显示500 错误,typecho1.0,目前我使用的是这个版本就没有问题:http://pan.baidu.com/s/1hq43dys
2.目前网站和插件已经正确配置,我想问一下这个插件在上传图片后是直接上传到七牛,还是仍然上传到本地空间,在第一次访问时才拉取到七牛?需不需要在七牛空间那边设置镜像加速?
3.希望增加对本地css/js等等静态文件的cdn加速功能(我觉得这个直接使用文件地址替换即可)

上传错误

可能是七牛更新了代码吧,php我不懂。。
最近上传的图片都变成这样:
20151126101330

还望作者解决一下!

增加 byte 流写入内容的考虑

增加 byte 流写入内容的考虑
用于XMLRPC接口上传附件因为XMLRPC上传用的byte流写入数据
108行

$filename = $file['tmp_name'];
       if (!isset($filename)) return false;

将其删掉

116行到127行

if ($error == null)   .... else return false; 

将其改为

if (isset($file['bytes'])) {
        	list($ret, $error) = $upManager->put($token, $option->savepath . $file['name'], $file['bytes']);
        	if ($error == null) {
        		return array(
        			'name' => $file['name'], 
        			'path' => $option->savepath . $file['name']  . ($option->imgstyle == '' ? '' : '-' . $option->imgstyle), 
        			'size' => $file['size'], 
        			'type' => $ext, 
        			'mime' => $file['mime']//Typecho_Common::mimeContentType($option->savepath . $file['name'])
        			);
        		
        	} else {
        		return false;
        	}
        	
        	
        } else {
	
	    // 上传文件
        $filename = $file['tmp_name'];
        //if (!isset($filename)) return false;
        list($ret, $error) = $upManager->putFile($token, $option->savepath . $file['name'], $filename);
           if ($error == null) {
        	return array(
        		'name' => $file['name'], 
        		'path' => $option->savepath . $file['name'] . ($option->imgstyle == '' ? '' : '-' . $option->imgstyle), 
        		'size' => $file['size'], 
        		'type' => $ext, 'mime' => Typecho_Common::mimeContentType($filename)
        		);
        		} else {
        	return false;
        
           }
        	
        }

安装注意

记得吧文件夹改名为:
QiniuFile 放入/usr/plugins文件夹下面

否则在1.0下不能正常激活。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.