Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
traktor90 #1
Member since Jun 2016 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: Sending file
Hello,
I am struggling with sending a simple image. Could you give me a short working example on sending image?
I looked at site: http://forum.ag-software.net/thread/74-how-to-transport-fi…
But it doesn't work with file in my filesystem. I also tried with some url to image in the web, but that doesn't work also.
I just want simple example of sending image.
Should I use agsXMPP.protocol.extensions.filetransfer.File class?
Thanks in advance
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
What are you trying to do exactly? There are many different ways and purposes for sending files in XMPP.
If you look at the MiniClient example you can an example for SOCKS5 bytestream file transfer there.

The thread you link to is OOB. There you usually upload the file to a server where it can be server over HTTP and just send the Uri to another client. The file upload is not in XMPP, it uses other APIs then like Dropbox, Azure Storage, Amazon S3 etc....

Alex
Avatar
traktor90 #3
Member since Jun 2016 · 2 posts
Group memberships: Members
Show profile · Link to this post
I don't want to use MiniClient example. There are about 800 lines of code to use to send file.(frmSendFile).
I just want simple few lines of code to send an image.
There is example, how you cand send text message in 3 lines of code. I hope I can send image in few line too.
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by traktor90:
There is example, how you cand send text message in 3 lines of code. I hope I can send image in few line too.

This is not possible with agsXMPP. in MatriX there is a FileTransferManager which allows you to send a file with only some lines of code. For agsXMPP you have to write this code or take the MiniClient codes.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS