mod_http_upload - HTTP File Upload (XEP-0363) using Ruby on Rails

百般思念 提交于 2019-12-04 07:58:09

In order to use this module add configuration setting in ejabberd.yml file

listen:
    # add following lines in listen section
    -
      module: ejabberd_http
      port: 5443
      tls: true
      certfile: "/etc/ejabberd/example.com.pem"
      request_handlers:
        "": mod_http_upload

  access:    # add following lines in access section
    soft_upload_quota:
      all: 1000 # MiB
    hard_upload_quota:
      all: 1100 # MiB

  modules:  #add following lines in modules section 
      mod_http_upload:
      docroot: "/home/xmpp/upload"
      put_url: "http://@HOST@:5443"

upload file on this url (according to your setting url) http://@HOST@:5443 as you do in ruby on rails .For more detail about configuration of module check this link- https://github.com/processone/ejabberd-contrib/blob/master/mod_http_upload/README.txt

after uploading file you can send link(url) to user for downloading file.

In my case i used https and its worked

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!