在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:mecab/paperclip-ipfs-storage开源软件地址:https://github.com/mecab/paperclip-ipfs-storage开源编程语言:Ruby 100.0%开源软件介绍:Paperclip IPFS StorageThis gem extends the Paperclip so that you can save file on IPFS network. Installationgem "paperclip-ipfs-storage" or put it on the Gemfile. UsageAdd class CreateMediaAttachments < ActiveRecord::Migration[5.0]
def change
create_table :media_attachments do |t|
t.attachment :file
t.string :file_ipfs_hash, :file_ipfs_hash, null: true, default: nil
end
end
end Then specify class MediaAttachment < ActiveRecord::Base
has_attached_file :file,
:storage => :ipfs,
:url => ':gateway_url'
end LimitationYou cannot remove the file uploaded. This is due to the design of IPFS 1. Footnotes |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论