carrierwave-base64:将编码为base64字符串的文件直接上传到carrierwave-源码

上传者: 38655284 | 上传时间: 2021-01-28 16:07:39 | 文件大小: 140KB | 文件类型: ZIP
载波:: Base64 将编码为base64的文件上传到载波。 这个小宝石对于与移动设备进行交互的API很有用。 该宝石需要Ruby 2.0或更高版本。 安装 将宝石添加到您的Gemfile中: gem 'carrierwave-base64' 如果需要蒙古包支持,也可以添加以下内容: gem "carrierwave-mongoid" 用法 将上传器安装到您的模型: mount_base64_uploader :image , ImageUploader 现在,您还可以通过将编码的base64字符串传递给属性来上传文件。 这也适用于正常的文件上传从文件中的字段HTML表单里面,所以你可以放心地更换mount_uploader与mount_base64_uploader同时支持文件输入和base64编码输入 上传文件扩展名 使用来自上传字符串的 gem和content_type自动识别上传的base64字符串的文件扩展名。 如果未注册所需的MIME类型,则可以使用: MIME :: Types . add ( MIME :: Type . new ( 'appl

文件下载

资源详情

[{"title":"( 29 个子文件 140KB ) carrierwave-base64:将编码为base64字符串的文件直接上传到carrierwave-源码","children":[{"title":"carrierwave-base64-master","children":[{"title":".travis.yml <span style='color:#111;'> 308B </span>","children":null,"spread":false},{"title":"carrierwave-base64.gemspec <span style='color:#111;'> 1.53KB </span>","children":null,"spread":false},{"title":"Rakefile <span style='color:#111;'> 28B </span>","children":null,"spread":false},{"title":".rubocop.yml <span style='color:#111;'> 239B </span>","children":null,"spread":false},{"title":"Gemfile <span style='color:#111;'> 103B </span>","children":null,"spread":false},{"title":".rspec <span style='color:#111;'> 29B </span>","children":null,"spread":false},{"title":"spec","children":[{"title":"support","children":[{"title":"custom_expectations","children":[{"title":"warn_expectation.rb <span style='color:#111;'> 515B </span>","children":null,"spread":false}],"spread":true},{"title":"schema.rb <span style='color:#111;'> 217B </span>","children":null,"spread":false},{"title":"models.rb <span style='color:#111;'> 114B </span>","children":null,"spread":false}],"spread":true},{"title":"adapter_spec.rb <span style='color:#111;'> 4.82KB </span>","children":null,"spread":false},{"title":"base64_string_io_spec.rb <span style='color:#111;'> 1.75KB </span>","children":null,"spread":false},{"title":"spec_helper.rb <span style='color:#111;'> 861B </span>","children":null,"spread":false},{"title":"fixtures","children":[{"title":"test.pdf <span style='color:#111;'> 85.84KB </span>","children":null,"spread":false},{"title":"base64_image.fixture <span style='color:#111;'> 139B </span>","children":null,"spread":false},{"title":"test.docx <span style='color:#111;'> 11.52KB </span>","children":null,"spread":false},{"title":"test.mp3 <span style='color:#111;'> 41.54KB </span>","children":null,"spread":false},{"title":"test.jpeg <span style='color:#111;'> 2.22KB </span>","children":null,"spread":false},{"title":"test.png <span style='color:#111;'> 85B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":".gitignore <span style='color:#111;'> 132B </span>","children":null,"spread":false},{"title":"CHANGELOG.md <span style='color:#111;'> 2.46KB </span>","children":null,"spread":false},{"title":"lib","children":[{"title":"carrierwave","children":[{"title":"base64.rb <span style='color:#111;'> 333B </span>","children":null,"spread":false},{"title":"base64","children":[{"title":"exceptions.rb <span style='color:#111;'> 189B </span>","children":null,"spread":false},{"title":"mounting_helper.rb <span style='color:#111;'> 2.16KB </span>","children":null,"spread":false},{"title":"adapter.rb <span style='color:#111;'> 1.26KB </span>","children":null,"spread":false},{"title":"version.rb <span style='color:#111;'> 74B </span>","children":null,"spread":false},{"title":"railtie.rb <span style='color:#111;'> 445B </span>","children":null,"spread":false},{"title":"base64_string_io.rb <span style='color:#111;'> 2.16KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"README.md <span style='color:#111;'> 2.79KB </span>","children":null,"spread":false},{"title":"LICENSE.txt <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明