file-transfer

Cordova's FileTransfer Writing Error (Code 1)

一曲冷凌霜 提交于 2019-12-06 03:41:41
问题 I'm using Cordova 4.2.0 for Android. I have some troubles to get FileTransfer plugin work properly. I suppose that there is a writing error exception:".myApp\/contentImages\/20150110220101.jpg: open failed: ENOENT (No such file or directory)" filename was previously tested and does not exist yet: rootFS.getFile('.myApp/contentImages/'+file,{create:false}, function(){ console.log(file+' already exists'); }, function(error){ console.log(file+" does not exist locally"); console.log("Error #"

Sending multiple files through Bluetooth

旧街凉风 提交于 2019-12-06 01:48:06
问题 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

PhoneGap .wav upload from an iOS device is creating a 0k file on the server

故事扮演 提交于 2019-12-05 16:38:38
I am attempting to record audio on an iPhone using PhoneGap, then send that audio to a server. I am using PhoneGaps Media APIs to make the recording, then the PhoneGap file transfer API to send the file to the server. I am able to make the recording just fine, and playing it back works perfectly. When I try to send it to the server, however, the recording shows up on the server but it says the file is 0k big. I've done fairly extensive searching on this issue and found others that have had this problem. For example: https://groups.google.com/forum/#!topic/phonegap/zjzSs6JVokE function win(r) {

Could not establish socket with any provided host

允我心安 提交于 2019-12-05 09:03:35
I am struggling with file transfer in android.I am using smack 4.1 to connect to openfire server. My problem is: When i am using Spark to Spark file transfer, it works fine.But when i transfer file from Spark to Android or Android to Android , The iq received showing error "Could not establish socket with any provided host" like this: <iq id="018vq-231" to="sender@domain.com/Spark 2.6.3" from="receiver@domain.com/Smack" type="error"> <error code="-1" type="CANCEL"> <item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/> <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" xml:lang="en"

Xmpp FileTransnfer in Android giving 503-service unavailable Error

别说谁变了你拦得住时间么 提交于 2019-12-05 07:12:38
问题 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

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

允我心安 提交于 2019-12-05 02:45:11
问题 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? 回答1: 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

How to get a fast file Hashing algorithm for large files on a mobile device

前提是你 提交于 2019-12-05 01:32:39
问题 prologue However one important discovery i make during testing the md5, adler32 and crc32 on a 100Mb file, is that strangely it take the same time. This can only mean one of two thing i guess, that on The Android device, the filesystem is the bottleneck and it cannot feed the algorithm fast enough, or i made a fundamental error implementing JNI, the later one i could live with. Hashing small files like images, mp3 and files under 10Mb take seconds using the MD5 algorithm. My problem is i have

Compress file on S3

我怕爱的太早我们不能终老 提交于 2019-12-04 23:51:37
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. Michel Feldheim S3 does not support stream compression nor is it possible to compress the uploaded file remotely. If this is a one-time process I suggest downloading it to a EC2 machine in the same

Getting total file length when using chunked http transfers

前提是你 提交于 2019-12-04 23:06:21
I've written a program in Java to use chunking to download large files over http. Everything is working fine but I'd like to add a progress bar which I can't do unless I get the total length of the file. Is there any way to do this? If the server provides a Content-Length header field, then that's easy. If it doesn't, then you're out of luck. Reasonable server implementations provide Content-Length when the content is static and has a known size. If the content is dynamically generated, then it's impossible to know the length a priori , at least without making two passes through the data. 来源:

Android WebRTC DataChannel binary transfer mode

懵懂的女人 提交于 2019-12-04 19:16:27
I achieved to transfer data between two android phones using WebRTC's DataChannel : On one side, I send the data: boolean isBinaryFile = false; File file = new File(path); // let's assume path is a .whatever file's path (txt, jpg, pdf..) ByteBuffer byteBuffer = ByteBuffer.wrap(convertFileToByteArray(file)); DataChannel.Buffer buf = new DataChannel.Buffer(byteBuffer, isBinaryFile); dataChannel.send(buf); On the other side, this callback should be called regardless of isBinaryFile value : public void onMessage( final DataChannel.Buffer buffer ){ Log.e(TAG, "Incomming file on DataChannel");