image-uploading

Upload image from iOS to PHP

不问归期 提交于 2019-11-28 06:48:58
问题 I'm trying to upload an image from my iOS App to my web server via PHP. Here is the following code: -(void)uploadImage { NSData *imageData = UIImageJPEGRepresentation(image, 0.8); //1 NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration]; //2 NSURLSession *defaultSession = [NSURLSession sessionWithConfiguration:config delegate:self delegateQueue:nil]; NSString *urlString = @"http://mywebserver.com/script.php"; NSMutableURLRequest *request = [

Vaadin with JQuery FileUpload

雨燕双飞 提交于 2019-11-28 06:11:06
问题 I would like to create FileUploader with Vaadin . But I need to get more features over normal Vaadin Upload. beautiful and easy to manage (but optional) fast and never failed while uploading include progress bar show preview multi file upload support upload file size and type restriction drag and drop client-side image resizable (it is main feature for me because all of my uploaded files were images) There has an addon MultiFileUpload. Yes , it is perfect for most of my requirements but not

Asp.net MVC: upload multiple image files?

旧巷老猫 提交于 2019-11-28 05:28:22
is there a good example of how to upload multiple image files in asp.net mvc? I know we can use HttpPostedFileBase to upload one file. Is there a way to upload multiple files by clicking one button? I used file upload in ajaxtoolbox in webform before and like how it works. Is there a similar way in MVC? or, is there a existing control that can do this well? free control is better, but it is ok even it costs some $. Thanks aleha Use this jQuery plugin just include plugin js files, create tag: <input type='file' multiple id='fileUpload' name="files[]" data-url="@Url.Action("Upload","Home")" />

Upload multiple images in swift using Alamofire

≯℡__Kan透↙ 提交于 2019-11-28 04:46:23
I'm using the following code to upload a single image to a server: private static func urlRequestWithComponents(urlString:String, parameters:Dictionary<String, String>, imageData:NSData?, imageName: String) -> (URLRequestConvertible , NSData) { // create url request to send let mutableURLRequest = NSMutableURLRequest(URL: NSURL(string: urlString)!) mutableURLRequest.HTTPMethod = Alamofire.Method.POST.rawValue let boundaryConstant = "myRandomBoundary12345"; let contentType = "multipart/form-data;boundary="+boundaryConstant mutableURLRequest.setValue(contentType, forHTTPHeaderField: "Content

Unable to upload file from Wordpress plugin to symfony backend server over the API?

◇◆丶佛笑我妖孽 提交于 2019-11-28 03:42:07
问题 My project have two Parts wordpress frontend Symfony backend I am trying to calling the API of may backend symfony project from Wordpress plugin to store some data in the backend. all the text data is being saved but when I am trying to send image files they are not being saved in the backend. I know its a tricky business but I am really looking for the solution. for uploading images we are doing following steps we are temporarily uploading images to our Wordpress upload folder then we are

How to preview picture stored in the fake path in Angular 2/Typescript?

痴心易碎 提交于 2019-11-28 03:40:42
Browsers don't take full path of local disc, instead they concatenate the filename with fakepath. Is there any way to access the file (image) from fakepath using typescript or angular 2? I have this: <img src="{{path}}" /> where my path variable stores the 'fakepath':"C:\fakepath\pic.jpg" in my .ts file. Edit This question discusses the way to preview image file from fakepath using javascript. If it is possible with Js, then is it not the same in case of ts? Günter Zöchbauer This should do what you want: <input type='file' (change)="readUrl($event)"> <img [src]="url"> readUrl(event:any) { if

Code to upload Video from Android to PHP

有些话、适合烂在心里 提交于 2019-11-28 02:15:42
问题 I am trying to upload video from Android code to my PHP web server code but can't get success. I am referring the following link to perform the uploading task but I am getting the following response in my Android code, but can't found any file on PHP server. Android response DEBUG/ServerCode(29484): 200 DEBUG/serverResponseMessage(29484): OK I have checked many things like setting values in php.ini files. Although I can upload images from Android code to server becasue from Android I am

Upload image from iPhone to server using WCF service using SOAP

…衆ロ難τιáo~ 提交于 2019-11-28 01:51:16
问题 hiii, i'm using wcf SOAP services for my app and i send the request like below. postStr = [NSString stringWithFormat:@"<?xml version=\"1.0\"?>\n" "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">\n" "<s:Body>\n" "<InsUpdDelActivityInfo xmlns=\"http://tempuri.org/\">\n" "<objEventsContent xmlns:d4p1=\"http://schemas.datacontract.org/2004/07/iCampuslite.Model.ActivityStream\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">\n" "<d4p1:ActCommentId i:nil=\"true\" />\n" "

Uploading an image using WCF RESTFul service full working example

荒凉一梦 提交于 2019-11-27 21:44:24
As part of a pretty large application I need to provide a REST Service that uploads an image. Since the whole application is .NET, I've been trying to find an working example of a WCF RESTFul Service that does that but couldn't (Which defines the whole configurations). There are handful of examples online but I couldn't (thanks to my lack of knowledge in WCF) make none of them work. (I keep getting exceptions thrown). I'll be happy to get linked to a working one. Please find a sample below: On Server: Interface: [WebInvoke] string PostImage(Stream stream); My Implementation class: public

Image resize by Javascript

ぐ巨炮叔叔 提交于 2019-11-27 20:19:46
I've web app running. And it uses ajax upload. The issue is recently users are uploading too big images. So it's taking a bit more time. Users are complaining about that. So what I was thinking is this, 'If I somehow crop and resize the image via js and then send it to the server via ajax upload then the time will be reduced'. So is there any way to do that? Any idea for it? A solution is to use modern ways like FileReader and Canvas (But this works only on the latest modern browsers). http://caniuse.com/filereader http://caniuse.com/canvas In this example i show how to let the client resize