processone / ejabberd

Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
https://www.process-one.net/en/ejabberd/
Other
6.06k stars 1.51k forks source link

Using mod_http_upload #3966

Closed mkassir95 closed 1 year ago

mkassir95 commented 1 year ago

Hello, I am using ejabberd version 22.10, operating system windows 10 I need to use mod_http_upload, but I am getting this error

image

mkassir95 commented 1 year ago

This is my ejabberd.yml file

hosts:

  • localhost

loglevel: info

listen:

port: 5222
ip: "::"
module: ejabberd_c2s
#starttls: true
#certfile: "./xmpp_example_com.pem"

- port: 5280 ip: "::" module: ejabberd_http request_handlers: /admin: ejabberd_web_admin

- port: 5281 module: ejabberd_http ip: "::" request_handlers: /api: mod_http_api /oauth: ejabberd_oauth

- port: 5443 module: ejabberd_http request_handlers: /upload: mod_http_upload

- port: 5347 ip: "::" module: ejabberd_service hosts: "mymuc.domain.tld": password: "mysecret"

acl: exampleorg: server: localhost

api_permissions: "admin api permsions": from:

modules: mod_admin_extra: {} mod_muc: access:

mkassir95 commented 1 year ago

These are my ejabberd logs

image

licaon-kter commented 1 year ago

OS/ejabberd version/gist of the config?

The template is not there for you to delete...

mkassir95 commented 1 year ago

I am sorry, I updated these information and I will use the template the next time

licaon-kter commented 1 year ago

Windows 10 means you run ejabberd on Windows via WSL or?

stat -u ejabberd /ejabberd/upload says what? replace ejabberd with your actual user that is used to run ejabberd

mkassir95 commented 1 year ago

I am run ejabberd using docker compose docker-compose up

This my docker-compose.yml file

version: '3.7'

services:

main: image: ejabberd/ecs container_name: ejabberd environment:

mkassir95 commented 1 year ago

and this my ejabberd.yml file

hosts:

  • localhost

loglevel: info

listen:

port: 5222
ip: "::"
module: ejabberd_c2s
#starttls: true
#certfile: "./xmpp_example_com.pem"

- port: 5280 ip: "::" module: ejabberd_http request_handlers: /admin: ejabberd_web_admin

- port: 5281 module: ejabberd_http ip: "::" request_handlers: /api: mod_http_api /oauth: ejabberd_oauth

- port: 5443 module: ejabberd_http request_handlers: /upload: mod_http_upload

- port: 5347 ip: "::" module: ejabberd_service hosts: "mymuc.domain.tld": password: "mysecret"

acl: exampleorg: server: localhost

api_permissions: "admin api permsions": from:

modules: mod_admin_extra: {} mod_muc: access:

mkassir95 commented 1 year ago

The upload folder is empty

image

licaon-kter commented 1 year ago

So it's /ejabberd/upload like in the .yml config or ~/upload like in your picture?

mkassir95 commented 1 year ago

like in the picture

licaon-kter commented 1 year ago

Umm, your config .yml says docroot: /ejabberd/upload which in NOT the same folder, right?

mkassir95 commented 1 year ago

the path in my should be like this docroot: /home/ejabberd/upload, true?

image

mkassir95 commented 1 year ago

I changed the log level to debug and I got these logs image

mkassir95 commented 1 year ago

I think the problem is in the put request 's paramtersm, but I did figured out what paramters I should send image

licaon-kter commented 1 year ago

Can you test with a proper client too, eg. Dino or Gajim, Siskin or Monal, Conversations?