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

file transfer in smack is not working #3968

Closed mkassir95 closed 1 year ago

mkassir95 commented 1 year ago

ejabberd.yml

hosts:

  • localhost

loglevel: debug

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 problem is that I am trying to send a file using smack library and I am getting this error D/SMACK: RECV (0): <iq xml:lang='en' to='admin@localhost/Smack' from='rawad@localhost/Smack' type='error' id='wld8U-12'><error type='cancel'><feature-not-implemented xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>

mkassir95 commented 1 year ago

This is my smack code

                BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(new

File(getFilesDir()+File.separator+"MyFile.txt"))); bufferedWriter.write("lalit poptani"); bufferedWriter.close(); FileTransferManager manager = FileTransferManager.getInstanceFor(conn1); OutgoingFileTransfer transfer = manager.createOutgoingFileTransfer("rawad@localhost/Smack"); transfer.sendFile(new File(getFilesDir()+File.separator+"MyFile.txt"), "You won't believe this!");

licaon-kter commented 1 year ago

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

If that works it means it's not a server issue so you can close this and continue elsewhere like https://igniterealtime.atlassian.net/jira/software/c/projects/SMACK/issues