Shrine 正在参加 2020 年度 OSC 中国开源项目评选,请投票支持!
Shrine 在 2020 年度 OSC 中国开源项目评选 中已获得 {{ projectVoteCount }} 票,请投票支持!
投票让它出道
已投票
授权协议 MIT
开发语言 Ruby
操作系统 跨平台
软件类型 开源软件
开发厂商
地区 不详
提 交 者 叶秀兰
适用人群 未知
收录时间 2015-10-28

软件简介

Shrine 是提供给 Ruby 应用的文件上传工具包:简单,灵活,高性能,安全,支持直接上传。

基础示例:

require "shrine"
require "shrine/storage/file_system"
Shrine.storages[:file_system] = Shrine::Storage::FileSystem.new("uploads")
uploader = Shrine.new(:file_system)
uploaded_file = uploader.upload(File.open("avatar.jpg"))
uploaded_file      #=> #<Shrine::UploadedFile>
uploaded_file.url  #=> "/uploads/9260ea09d8effd.jpg"
uploaded_file.data #=>
# {
#   "storage"  => "file_system",
#   "id"       => "9260ea09d8effd.jpg",
#   "metadata" => {...},
# }
展开阅读全文

代码

评论 (0)

加载中
更多评论
暂无内容
发表了博客
01/28 20:09

[WesternCTF2018]shrine

0x00 知识点 SSTI模板注入: 模板注入涉及的是服务端Web应用使用模板引擎渲染用户请求的过程 服务端把用户输入的内容渲染成模板就可能造成SSTI(Server-Side Template Injection) 0x01模板引擎 模板引擎(这里特指用于Web开发的模板引擎)是为了使用户界面与业务数据(内容)分离而产生的,它可以生成特定格式的文档,用于...

0
0
发表了博客
07/30 09:03

[WesternCTF2018]shrine

0x00 知识点 SSTI模板注入: 模板注入涉及的是服务端Web应用使用模板引擎渲染用户请求的过程 服务端把用户输入的内容渲染成模板就可能造成SSTI(Server-Side Template Injection) 0x01模板引擎 模板引擎(这里特指用于Web开发的模板引擎)是为了使用户界面与业务数据(内容)分离而产生的,它可以生成特定格式的文档,用于...

0
0
发表了博客
2018/09/12 23:18

2018 徐州网络赛A

262144K After Incident, a feast is usually held in Hakurei Shrine. This time Reimu asked Kokoro to deliver a Nogaku show during the feast. To enjoy the show, every audience has to wear a Nogaku mask, and seat around as a circle. There are N guests Reimu serves. Kokoro has 2^k2k masks numbered fro...

0
0
发表了博客
2016/07/25 16:05

Java Magic. Part 2: 0xCAFEBABE

Did you know that all java classes start with the same 4 bytes. In hex it's CAFEBABE. To make sure, create simple java file, call it Hello.java: public class Hello { public static void main(String[] args) { System.out.println("Hell, O'World!"); } } Compile it by javac Hello.java,...

0
0
发表了博客
2018/09/10 09:11

ACM-ICPC 2018 徐州赛区网络预赛 A. Hard to prepare(递推)

A. Hard to prepare 题库链接 262144K After Incident, a feast is usually held in Hakurei Shrine. This time Reimu asked Kokoro to deliver a Nogaku show during the feast. To enjoy the show, every audience has to wear a Nogaku mask, and seat around as a circle. There are N guests Reimu serves. Kokoro...

0
0
发表了博客
05/18 16:01

攻防世界高手进阶区通关教程(1)

来到高手进阶区 baby_web 当我们访问index.php的时候会跳转到1.php,我们检查元素,打开网络,我们在输入index.php即可看到消息头有flag Training-WWW-Robots 打开robots.txt看到flag地址,打开即可 php_rce 这是thinkphp rce漏洞 index.php?s=index/think\app/invokefunction&function=call_user_func_array&vars[0]=s...

0
0
发表了博客
2018/09/10 22:50

ACM-ICPC 2018 徐州赛区网络预赛 A.Hard to prepare 【规律递推】

任意门:https://nanti.jisuanke.com/t/31453 A.Hard to prepare After Incident, a feast is usually held in Hakurei Shrine. This time Reimu asked Kokoro to deliver a Nogaku show during the feast. To enjoy the show, every audience has to wear a Nogaku mask, and seat around as a circle. There are N gue...

0
0
发表了博客
04/28 10:18

CodeForces - 1245 D - Shichikuji and Power Grid

Shichikuji is the new resident deity of the South Black Snail Temple. Her first job is as follows: There are nn new cities located in Prefecture X. Cities are numbered from 11 to nn. City ii is located xixi km North of the shrine and yiyi km East of the shrine. It is possible that (xi,yi)=(xj,yj)...

0
0
发表了博客
2019/11/03 14:17

Codeforces Round #597 (Div. 2) D. Shichikuji and Power Grid 最小生成树

<center>D. Shichikuji and Power Grid</centerD.> Shichikuji is the new resident deity of the South Black Snail Temple. Her first job is as follows: There are 𝑛 new cities located in Prefecture X. Cities are numbered from 1 to 𝑛. City 𝑖 is located 𝑥𝑖 km North of the shrine and 𝑦?...

0
0
没有更多内容
加载失败,请刷新页面
点击加载更多
加载中
下一页
暂无内容
0 评论
2 收藏
分享
返回顶部
顶部