file-transfer

Ionic app image upload from camera / photo library

好久不见. 提交于 2019-11-28 17:36:40
I'm working on a ionic chat app where the user can upload a photo as part of their message. I'm looking for a way to upload the image to my webhost server so I can retrieve it later via a URL. The problem is that I'm not able to get it to upload to my web server. I'm using these two plugins: org.apache.cordova.file-transfer cordova-plugin-camera When I run the app in xcode simulator and select a picture from the device photolibrary, the console gives me the following messages: File Transfer Finished with response code 200 void SendDelegateMessage(NSInvocation *): delegate (webView

Transfer files to/from session I'm logged in with PuTTY

我只是一个虾纸丫 提交于 2019-11-28 16:38:11
问题 I'm logged into a remote host using PuTTY. What is the command to transfer files from my local machine to the machine I'm logged into on PuTTY? 回答1: This is probably not a direct answer to what you're asking, but when I need to transfer files over a SSH session I use WinSCP, which is an excellent file transfer program over SCP or SFTP. Of course this assumes you're on Windows. 回答2: Click on start menu. Click run In the open box, type cmd then click ok At the command prompt, enter: c:>pscp

Name of picture uploaded with file phonegap plugin “image%A3456”

杀马特。学长 韩版系。学妹 提交于 2019-11-28 14:44:05
I use a FileTransfert plugin phonegap to upload picture from phone to server. The code work right but the name of picture upload is image%A4444 But I want to save the picture with the same name does it have on phone to display then. What shall i modify the code ? Thanks Function js: function uploadImage() { document.getElementById('picture_msg').innerHTML = ""; // Get URI of picture to upload navigator.camera.getPicture( //function(uri) { function(imageURI) { try { // Pick image from div var img = document.getElementById('pimage'); img.style.visibility = "visible"; img.style.display = "block";

File Transfer not working smack 4.1 android

邮差的信 提交于 2019-11-28 13:09:42
Currently I am playing around with the new Smack 4.1 that offers full support for android. Sending and receiving messages is no problem, works fine. But now, I get stuck on sending and receiving Files. For example: Send File public void sendFile(String fileName,String to){ if(transferManager==null) { transferManager = FileTransferManager.getInstanceFor(mConnection); } OutgoingFileTransfer transfer = transferManager.createOutgoingFileTransfer(to); try { transfer.sendFile(new File(fileName), "This is a Test!"); } catch (SmackException e) { e.printStackTrace(); } } Receive files public void

Error message: “Bitmap Image is not valid” on received from Socket

元气小坏坏 提交于 2019-11-28 12:27:41
问题 I'm trying to get a screenshot and send it over the web using ClientSocket and ServerSocket components. I'm having problems when I try to turn the stream received at ServerSocket into a picture again. Error message "Bitmap Image is not valid!" when performing: DesktopForm.imgScreen.Picture.Bitmap.LoadFromStream(ms); I do not know if the problem is in the way sending the image or get in the way. My server code: unit UntThreadDesktop; interface uses System.Classes, System.SysUtils, System.Win

FTP client server model for file transfer in Java

烈酒焚心 提交于 2019-11-28 11:48:10
Well, I am trying to implement the ftp server and ftp client in Java. I am trying to receive a file from server. Following is line of codes. I am able to achieve Connection between server and client, but unable to send filename to server also. Well can anyone guide me whether this approach is correct or if not, please suggest proper changes. Server's Implementation: import java.net.*; import java.io.*; class MyServer { ServerSocket ss; Socket clientsocket; BufferedReader fromclient; InputStreamReader isr; PrintWriter toclient; public MyServer() { String str = new String("hello"); try { //

Cordova File Transfer remove Multipart or Content-Disposition Header

蹲街弑〆低调 提交于 2019-11-28 10:49:16
问题 I managed to upload an image to my server using Cordova File Transfer plugin. var img = <full path to image> var url = <url to webservice> var options = new FileUploadOptions(); //no specified options, using defaults var ft = new FileTransfer(); ft.upload(img, encodeURI(url), win, fail, options); var win = function (r) { console.log('Successfully sent'); } var fail = function (error) { console.log("An error has occurred: Code = " + error.code); }; However, my server had problems reading the

Java file transfer file to server

给你一囗甜甜゛ 提交于 2019-11-28 04:51:18
问题 I am new to Java networking, and having looked for a resolution for my problem for a while now, I figured why not ask some advice from some more qualified people on this matter? I currently have made a small tool which manages a server of mine, and another small client tool. My goal is for the tool to be able to send commands from the client to the server computer. This way I can perform certain actions on the server computer from another machine, including sending a zip archive with updated

scp from Linux to Windows

笑着哭i 提交于 2019-11-28 03:03:59
I am running a putty client on a Windows machine to connect successfully to a Linux box. Now I want to be able to copy a file from the Linux machine under the path /home/ubuntu/myfile to C:/Users/Anshul/Desktop on my local computer. The user at the Windows machine is anshul . I am giving the following command on putty but it is not working: scp /home/ubuntu/myfile ip_address_of_windows_machine:C:/Users/Anshul/Desktop I think the path for the Windows machine is wrong. Please help as I have banged my head on a large number of forums but none seem to give correct path for Windows server. Don't

Bluetooth file transfer Android

≯℡__Kan透↙ 提交于 2019-11-27 18:25:59
I am facing a problem in sending large files over bluetooth sockets. Smaller files get transferred correctly. I believe upto 161280 bytes get transferred correctly. EDIT: I did some more testing and narrowed down the cause. It seems that outStream.write(mybytearray, 0, mybytearray.length); in the sending code part is NOT writing more than 161280 bytes. I saw this behavior by not closing the socket connection, thereby causing the read in the receiving part to "block" on 161280 bytes. What is wrong with the bluetooth output stream here? What am I doing wrong? EDIT 2: Doing this lets it through.