file-transfer

Disconnection of XMPP client while sending big size image, video and audio

六月ゝ 毕业季﹏ 提交于 2019-12-04 07:08:33
问题 I have implemented xmpp using robbiehanson xmpp example. I am able to chat and also able to send images. The images which i am sending are converted to nsdata and further converted to Base64String, and later sending the string with [self.xmppStream sendElement:message]; This way if the size of image is small i am able to send that instantly but if the size of images is bigger the two xmpp user gets disconnected and the file is not transferred. Same thing happens with video and audio. Though i

Android: Image received over socket is corrupted

梦想与她 提交于 2019-12-04 06:10:00
问题 Hi here's the problem: the server sends the image to the client correctly ( I think ). The file received from the client is the same size of the file present on the server phone, so every byte got transferred I guess but still the image is not visible. Either the server and the client are android phones. Thanks in advance I hope you can help me. Server code: public class FileActivity extends Activity { private FileInputStream fileInputStream; private BufferedInputStream bufferedInputStream;

Sending multiple files through Bluetooth

梦想的初衷 提交于 2019-12-04 05:59:40
I saw your answer about sending file through Bluetooth. (answered Jun 13 '11 at 5:01) Intent i = new Intent(Intent.ACTION_SEND); i.setType("image/jpeg"); i.putExtra(Intent.EXTRA_STREAM, Uri.parse("/sdcard/file.jpg")); startActivity(Intent.createChooser(i, "Send Image")); Yes! It works. It will open a default Bluetooth tool/window/dialog to send a file. But would you please teach me how to send more files? Here is my code... String xFile[3] = { "aa.txt", "bb.txt", "cc.txt" }; Intent i = new Intent(Intent.ACTION_SEND); i.setType("text/plain"); for (int i = 0; i < 3; i ++) { intent.putExtra

Stream.CopyTo - How do I get the sent Bytes?

孤街浪徒 提交于 2019-12-04 05:45:46
问题 I try to get the transfer speed at a ftp-upload, but I don't know where I should "get" it: Code-Snippet: FtpWebRequest request = (FtpWebRequest)WebRequest.Create(job.GetDestinationFolder() + "\\" + fileOnlyName); request.Method = WebRequestMethods.Ftp.UploadFile; request.Credentials = new NetworkCredential(Manager._user, Manager._password); using (var requestStream = request.GetRequestStream()) { using (var input = File.OpenRead(file)) { //input.CopyToAsync() input.CopyTo(requestStream); //IS

Tips / Examples on sending an Image file (jpeg, png) over socket programming?

佐手、 提交于 2019-12-04 04:19:25
问题 I've heard that we can somehow send an image file with binary over a socket... But I have no idea on how to convert an image file into binary or how to even think of sending it over a socket... Was hoping if someone could post a simple example? or point me in the right direction :) I am also using QT for just my gui, but not using QT socket programming. Thanks so much :D I really appreciate it Question @ djc: How would you get the directory path for an image, and somehow use the send command

Multiple file uploads with cURL

岁酱吖の 提交于 2019-12-04 03:24:28
问题 I'm using cURL to transfer image files from one server to another using PHP. This is my cURL code: // Transfer the original image and thumbnail to our storage server $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_VERBOSE, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_URL, 'http://' . $server_data['hostname'] . '.localhost/transfer.php'); curl_setopt($ch, CURLOPT_POST, true); $post = array( 'upload[]' => '@' . $tmp_uploads .

Xmpp FileTransnfer in Android giving 503-service unavailable Error

瘦欲@ 提交于 2019-12-03 21:41:37
Now am working with Xmpp file Transfer in Android.While am sending files it give a 503 service unavailable error. > 07-29 15:33:12.183: D/SMACK(22151): 03:33:12 PM SENT (1095973320): > <iq id="s9DTB-10" to="jithu4@jabber.org/Smack" > from="jithu1@jabber.org/Smack" type="set"><si > xmlns="http://jabber.org/protocol/si" id="jsi_6388535575928662640" > mime-type="image/jpeg" > profile="http://jabber.org/protocol/si/profile/file-transfer"><file > xmlns="http://jabber.org/protocol/si/profile/file-transfer" > name="IMG_20130715_115622_1445552069.jpg" size="2105955" > ><desc>test_file</desc></file>

android phonegap camera and image uploading

守給你的承諾、 提交于 2019-12-03 19:40:09
问题 I have been trying to make this work, searched google and here since Friday. My ultimate goal is to be able take multiple pictures with a title and description for each and upload them to a server, then display on a web page. What I have so far is: the ability to give one image a title and description, browse the gallery, find an image and select it. BUT when I do the image is uploaded along with the form, immediately. I would like to be able to do this using a submit button. I also have a

How can I upload and download files with graphene-django?

早过忘川 提交于 2019-12-03 16:31:05
I'm currently using graphene-django v2.0 and I've absolutely no clue of how can I upload and download files like images, does anyone have an example of a query where you can download an Image and a mutation where you can upload one? UPLOADS You don't need to invent your own frontend code to add a file upload to a mutation -- there are existing packages that do this already. For example, apollo-upload-client if you are using Apollo. To receive an uploaded file on the backend, the files are going to be available in the dictionary request.FILES . So any mutation handling a file upload needs to

Android File Transfer not working via XMPP and OpenFire

纵然是瞬间 提交于 2019-12-03 12:57:53
问题 Problem : Can't receive a file sent to my android app via XMPP and OpenFire Server. I can successfully send a file though. The asmack jar I am using is asmack-jse-buddycloud-2010.12.11.jar Code : connConfig = new ConnectionConfiguration("beta.myCompany.co.uk", 5222); connConfig.setSASLAuthenticationEnabled(true); try { connect("username", "password"); } catch (Exception e) { e.printStackTrace(); } ServiceDiscoveryManager sdm = ServiceDiscoveryManager.getInstanceFor(connection); if(sdm == null