upload

iPhone UIImage upload to web service

余生长醉 提交于 2019-11-29 02:37:06
I worked on this for several hours today and I'm pretty close to a solution but clearly need some help from someone who's pulled this off. I'm trying to post an image to a web service from the iPhone. I'll post the code first then explain everything I've tried: NSData *imageData = UIImageJPEGRepresentation(barCodePic, .9); NSString *soapMsg = [NSString stringWithFormat: @"<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap

Background Intelligent Transfer Service In C#

可紊 提交于 2019-11-29 02:27:52
Anyone successfully using this in c# or is there a better alternative to this? Also any good working project that I can look at and get a good feel? most projects i have come across is in C++ and was looking for a C# project Yes, we're using it in a tool to let customers upload logs, dumps, etc. to our customer support department. You could use it directly via PInvoke/COMInterop, but I suggest to have a look at SharpBITS.NET , which wraps the BITS interface nicely. I'm the PM for the BITS team at Microsoft -- and we have a new docs.microsoft.com page that talks about using BITS and C#, plus a

onComplete and onCompleteAll events failing to fire when using Uploadify

谁说胖子不能爱 提交于 2019-11-29 02:07:37
I have been using uploadify (www.uploadify.com) to upload images to my website, and it works beautifully until you try to expand on it a little. Im trying to get it to remove a queued up file from the list once that file has been uploaded. To do this, you would initialize uploadify as such: $("#fileUpload").uploadify({ 'uploader': '/scripts/uploadify.swf', 'cancelImg': '/images/cancel.png', 'script': '/Album/Manage/', 'fileDesc': 'Image Files', 'fileExt': '*.jpg;*.jpeg;*.gif;*.png', 'multi': true, 'auto': false, 'simUploadLimit': 3, 'scriptData': {'album_id':'7'}, onComplete: function(event,

How can I write tests for file upload in PHP?

有些话、适合烂在心里 提交于 2019-11-29 01:27:02
I'm using simpleTest to write my PHP tests. I'm writing a file upload plugin and was wondering how I may be testing it. I would like to check that the file is correctly uploaded, in the right folder, that error are correctly returned when needed, etc. How do I emulate a file upload (through the $_FILES variable) ? Are there any issues I should be aware of ? I've found an alternate solution. I've spoofed the $_FILES array with test data, created dummy test files in the tmp/ folder (the folder is irrelevant, but I tried to stick with the default). The problem was that is_uploaded_file and move

Uploading binary file on Node.js

梦想与她 提交于 2019-11-29 00:59:58
问题 I am using Flash to record and upload audio to a node server. The Flash client is a variation of jrecorder. When the user is done recording the audio is uploaded using a POST request (not a form because Flash cannot create files) with the audio ByteArray as the data of the POST request (see more here). I am able to receive the file correctly on Node-land using the code below but the audio that comes out is mangled and you cannot hear anything. With that said, the content of the file can be

Using Dropbox Java API for uploading files to dropbox

ぐ巨炮叔叔 提交于 2019-11-29 00:45:11
I want to upload files using the java API for DropBox. The following code gets me the oauth_token and oauth_secret. but when ever I try to upload a file I get a exception. Java Class package com.dropbox.client; import com.dropbox.client.DropboxAPI.Config; import java.io.File; import java.net.URL; import java.util.HashMap; import java.util.Map; /** * * @author Charan */ public class DBmain { public DBmain() { System.setProperty("java.net.useSystemProxies", "true"); Map configuration= new HashMap(); configuration.put("consumer_key", "XXXXXXXXXXXXXXXX"); configuration.put("consumer_secret",

Uploading an image from a UIImage as a JPEG together with other POST-data

老子叫甜甜 提交于 2019-11-29 00:29:39
I am making a web service and an iOS app using this web service. The web service's API accepts a HTTP POST request with two POST-variables: picture[title] the title of the picture picture[picture] the picture data itself Now with HTML this is not a problem as the web browser constructs the request and the only thing I have to worry about is enctype="multipart/form-data" . But with the iOS app I have two problems, together with two questions I am going to ask right now. How to convert the UIImage from the image picker or camera to raw JPEG-data? How to make the NSURLRequest with the right POST

Security issues in accepting image uploads

旧城冷巷雨未停 提交于 2019-11-29 00:10:38
What are the major security issues to consider when accepting image uploads, beyond the normal stuff for all HTTP uploads? I'm accepting image uploads, and then showing those images to other users. How should I verify, for example, that the uploaded image is actually a valid image file? Are there any known vulnerabilities in viewers that are exploitable by malformed image files for which I should be concerned about accidentally passing along exploits? (Quickly googling seems to show that there once was in IE5/6.) Should I strip all image metadata to help users prevent unintentional information

Phonegap's FileTransfer.upload() throwing error code 3 on Android

佐手、 提交于 2019-11-28 23:47:32
I am working on uploading a picture to a server. I am able to successfully upload an image using iOS but when i try on android I get the error code 3. Currently using phonegap cordova 1.8.1. I already tried adding true to the parameters upload(filePath, server, successCallback, errorCallback, options, **true**); and adding this options.chunkedMode = false; My AndroidManifest file contains: <uses-permission android:name="android.permission.INTERNET" /> My cordova.xml file contains: <access origin="*"/> Am I missing something? Thanks The issue probably is not in Phonegap. if the server is a

Choose image from gallery and camera through web view is not working in Android 6.0 Marshmallow

Deadly 提交于 2019-11-28 23:46:25
Here is my code. I am using WebView for registration purposes. In the registration process I have to upload an image from the device. I have finished the code for this and it is working properly in every Android version except Marshmallow. I have given all necessary permissions from the manifest. The code: public class WebViewActivity extends Activity { private static final int INPUT_FILE_REQUEST_CODE = 1; private static final int FILECHOOSER_RESULTCODE = 1; private static final String TAG = WebViewActivity.class.getSimpleName(); private static final int TIME_DELAY = 2000; private static long