file-transfer

Cordova FileTransfer sends file but nothing received

﹥>﹥吖頭↗ 提交于 2019-12-08 02:32:38
问题 I'm sending a video recorded via Cordova's MediaCapture plugin to a remote server via the FileTransfer plugin, but nothing - neither the file, nor any data whatsoever - is arriving at the server end. The server receives the request, but it seems to be empty. According to Cordova, everything goes fine. Here's the readout from the success callback: And here's my JS: ( mediaFiles[0] is the captured video file) var options = new FileUploadOptions(); options.fileName = 'foo.bar'; options.mimeType

Zf2 file upload by jQuery File Upload - file was not found

最后都变了- 提交于 2019-12-08 01:56:40
问题 when I use jQuery File Upload I have error during ajax upload. In controller: $adapter = new \Zend\File\Transfer\Adapter\Http(); $adapter->isValid(); or $adapter->receive(); Both methotds returns "File [file name] was not found" dump from $_FILES: Array ( [files] => Array ( [name] => Penguins.jpg [type] => image/jpeg [tmp_name] => /tmp/phpwQoG2L [error] => 0 [size] => 777835 ) ) If I use move_uploaded_file in the same place all works ZF2 v2.2.4 What is wrong? 来源: https://stackoverflow.com

Upload image from phonegap app to WCF service

孤人 提交于 2019-12-07 15:20:13
问题 I am trying to upload image from my mobile to WCF server using phonegap file transfer API. Following is my code. But I am not able to upload the image to server. Please give some suggestion. Test.html <body > <div data-role="view" id="uploadView" data-reload="true"> <div data-role="content"> <button onclick="getphoto();">get a Photo</button> <img src="" id="myimg" style="border:1px solid #0f0;height:200px;width:200px;" /> </div> </div> <script> function getphoto() { navigator.camera

C- Socket : Programming a Client/Server-Application to send a file

允我心安 提交于 2019-12-07 14:28:11
问题 I want to program an application to send a file with sockets: Here my Server: void str_server(int sock) { char buf[1025]; const char* filename="test.text"; FILE *file = fopen(filename, "rb"); err_abort("Test"); while (!feof(file)) { int rval = fread(buf, 1, sizeof(buf), file); send(sock, buf, rval, 0); } } and here my client: void RecvFile(int sock, const char* filename) { int rval; char buf[0x1000]; FILE *file = fopen(filename, "wb"); while ((rval = recv(sock, buf, sizeof(buf), 0)) > 0) {

Copying contents of .NET build folder to Ubuntu server using Plink

对着背影说爱祢 提交于 2019-12-07 11:36:31
I'm building a pre-deploy script in PowerShell that creates a production build of my .NET Core Web Api application and then SSHs into my Ubuntu Digital Ocean Droplet via SSH key. I'm currently at a stage where I create the build, copy the build folder using Copy-Item , SSH into my server and then this is where I'm completely stuck. I know that I can run BASH commands from my PowerShell script because I've tried some basic operations like creating and deleting a directory, I can cd in and out of directories. I've tried storing the copied .NET build folder in memory as a variable: $build = Copy

Which compression type should i choose in SharpZipLib?

本秂侑毒 提交于 2019-12-07 05:06:19
问题 I have a File Transfer Application that sends files and folders. (Server - client) I am trying to send data over TCP (sockets), I've made some rules for the way of transferring the data, so if it's sending a large folder that has many files, it should compress them into a single zip file first then when that zip file sent, the receiver has to decompress it. so I have decided to use SharpZibLib and I have got a question about it. Which type of compressing should i choose for my application? I

Cordova FileTransfer Download error

喜夏-厌秋 提交于 2019-12-07 02:08:24
I have a simple hybrid app which should download files with cordova 2.3.0. From the documentation: var filePath = someFullPath; //e.g. "file:///mnt/sdcard/myfile.pdf" var uri = encodeURI("http://someurl.com/myfile.pdf"); var fileTransfer = new FileTransfer(); fileTransfer.download( uri, filePath, function(entry) { console.error("download complete: " + entry.fullPath); }, function(error) { console.error("download error source " + error.source); console.error("download error target " + error.target); console.error("donwload error code " + error.code); console.error("http: "+error.http_status); }

Compress file on S3

感情迁移 提交于 2019-12-06 18:21:57
问题 I have a 17.7GB file on S3. It was generated as the output of a Hive query, and it isn't compressed. I know that by compressing it, it'll be about 2.2GB (gzip). How can I download this file locally as quickly as possible when transfer is the bottleneck (250kB/s). I've not found any straightforward way to compress the file on S3, or enable compression on transfer in s3cmd, boto, or related tools. 回答1: S3 does not support stream compression nor is it possible to compress the uploaded file

Can P2P be done without port forwarding?

怎甘沉沦 提交于 2019-12-06 14:42:20
问题 I was making a simple file transfer program through IRC and when I was reading up I saw that IRC when sharing a file creates a direct connection between the two users independent of the server (DCC, Direct Client Connect). After searching a while I have found this: Direct Connect and Advanced Direct Connect. None of these pages answer this question that I can't get out of my head: Is P2P data transfer possible without any user doing a special port-forward? An intermediate server which helps

Designing a file transfer protocol in c++ [closed]

▼魔方 西西 提交于 2019-12-06 14:32:27
Closed . This question is opinion-based . It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post . Closed last year . I need to write a simple file transfer protocol in C++ to upload or download a file from a client to a server. Right now both my client and server applications are do-it-all scripts. I want to modularize everything in classes/methods so I can more easily modify things later. To upload a file, I need the name of user sending file (no authentication though), file name, file size