WishMelz / tFile

基于telegra.ph的文件存储系统 https://wishmelz.github.io/tFile/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tFile

使用 https://telegra.ph 的文件上传接口,上传自己的图片或者视频! [你可以理解为白嫖]

https://wishmelz.github.io/tFile/

[因为telegra有5M大小的限制, 所以我们可以用TG客户端的链接, TG客户端最大限制为2G!!!! 教程比较复杂[https://github.com/WishMelz/tFile/tree/tgFile]]

免费文件储存 https://github.com/WishMelz/gFile 基于 gofile.io 即开即用.

启动运行

yarn install
yarn serve
yarn build

因为telegra.ph的原因, 以及它上传api跨域的问题. 所以使用nginx代理如下⬇️

server {
  	listen 80;
  	server_name xx.xxxx.com; # 这个是域名
	  location /upload {
    add_header Access-Control-Allow-Origin *;
    add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
    add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
		if ($request_method = 'OPTIONS') {
		    return 204;
		}
	     proxy_pass https://telegra.ph/upload;
	     proxy_redirect default;
    }
}

这个是只代理了上传的接口, 当然了你还可以直接代理整个网站,在国内也能用.

location / {
    proxy_pass https://telegra.ph/;
    proxy_redirect default;
}

修改一下图片的路径 views/Home.vue

如果想批量上传:

        <el-upload
          style="width: 100%"
          class="upload-demo"
          drag
          multiple
          action="/"
          :before-upload="befUpload"
        >

然后渲染在改成列表渲染!!

About

基于telegra.ph的文件存储系统 https://wishmelz.github.io/tFile/


Languages

Language:Vue 52.7%Language:JavaScript 42.1%Language:HTML 5.2%