image-uploading

Issue while uploading Image

大憨熊 提交于 2019-12-08 00:44:25
问题 Step 1 : here I am creating the Request NSMutableURLRequest *request1 = [[AFHTTPRequestSerializer serializer] multipartFormRequestWithMethod:@"POST" URLString:[NSString stringWithFormat:@"%@%@", API_MAIN_URL, IMAGE_UPLOAD] parameters:param constructingBodyWithBlock:^(id formData) { [formData appendPartWithFileURL:[NSURL fileURLWithPath:strImagePath] name:@"sendimage" fileName:[strImagePath lastPathComponent] mimeType:@"image/png" error:nil]; } error:nil]; [request1 setValue:authToken

Uploading image in ASP.NET Boilerplate

血红的双手。 提交于 2019-12-07 18:46:04
问题 When posting an image, HttpContext.Current.Request is null . Is there any simple way to achieve this? I am using dropzone.js on client side. Project is Angular with Web API (ASP.NET Core 2.0) template. [HttpPost] public HttpResponseMessage UploadJsonFile() { HttpResponseMessage response = new HttpResponseMessage(); var httpRequest = HttpContext.Current.Request; if (httpRequest.Files.Count > 0) { foreach (string file in httpRequest.Files) { var postedFile = httpRequest.Files[file]; var

Rails 4: Multiple image upload using paperclip

夙愿已清 提交于 2019-12-07 18:35:46
问题 I'm looking to upload multiple images to my 'locations' model. I've called the images model 'assets'. One location has multiple assets. I'm also using paperclip to handle the uploads and nested_form to allow selecting multiple assets. Weirdly, the locations hash looks to be passing the variables correctly, but they don't appear to be being picked up by the assets model. Any help would be great! Location model class Location < ActiveRecord::Base has_many :location_post has_many :posts,

Replace the Inside image by Outside image

我只是一个虾纸丫 提交于 2019-12-07 14:52:38
问题 User click on Mask & upload the image.... Its displaying same image two times , also Edit Text is displaying on image.... Once user click on Edit Text, we are displaying pop up box.... There we can see Zoomin & Zoomout buttons are displaying.... Issue : Once we click on those buttons, its zooming the outside image , but not the inside image.... Requirement : So I want to replace the Inside image by outside image & Delete the Inside image , so that zoom feature will work for uploaded image....

Argument 1 passed must be an instance of App\Request, instance of Illuminate\Http\Request given

点点圈 提交于 2019-12-07 14:24:58
问题 I have created a method in my User model to upload a poster (with intervention)for the user: /** * Store user's poster. */ public static function storePoster(Request $request) { if($request->hasFile('posterUpload')){ $poster = $request->file('posterUpload'); $filename = time() . '.'. $poster->getClientOriginalExtension(); Image::make($poster)->resize(356,265)->save(public_path('/uploads/posters/'.$filename)); $check = Setting_user::where([ ['user_id', '=' ,Auth::user()->id], ['setting_id','='

Struts 2 - Intercept an image file uploading with CKEditor

余生颓废 提交于 2019-12-07 12:48:09
问题 I have a CKEditor on different pages of the site, so I settled up the uploads to true and all the configuration stuff for it to work, and the image upload worked just fine for "Send it to the Server" tab. But from here I want to intercept or interact with upload function to be able to upload images not to a folder, but into database with some flags like "page" where is image uploaded, "category" , "cropping" and some another manipulations with them. So how could it be done to intercept this

upload image from ipad app to node js server using multiparty

白昼怎懂夜的黑 提交于 2019-12-07 05:35:47
问题 I am very new to javascript and node js. I am working on uploading image from my iPad app to rest api of node js(express js) using multiparty module. Here is my image upload code in objective c. NSData *imgData = UIImageJPEGRepresentation(img.image, 0.2); NSString *urlString = @"http://localhost:3000/api/uploadimage"; NSString *str = @"displayImage"; NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init]; [request setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData]; [request

How to associate direct upload fields with a model using Cloudinary in Rails?

蓝咒 提交于 2019-12-07 05:25:56
问题 With Cloudinary and their Carrierwave plugin I can write a form in my view that will upload an image to their cloud and bind it to a model attribute called picture , like so: <%= form_for(@post) do |post_form| %> <%= post_form.hidden_field(:picture_cache) %> <%= post_form.file_field(:picture) %> <% end %> This works. But I can't figure out how to bind the attribute to the model while following their documentation for direct uploads in Rails. Their example uses a form_tag that isn't bound to a

Upload a file via <input \input> in HTML form with VBA

情到浓时终转凉″ 提交于 2019-12-07 04:38:25
问题 I am trying to upload a picture file to OCR Site, however, the PDF file doesn't get uploaded into the site. I am using the following code to achieve it and below is the HTML segment : Sub DownPDF() Dim FileName As String: FileName = "C:\Users\310217955\Documents\pdfdown\SGSSI001_HL1464_2011.pdf" Dim DestURL As String: DestURL = "https://www.newocr.com/" Dim FieldName As String: FieldName = "userfile" Call UploadFile(DestURL, FileName, FieldName) End Sub '******************* upload - begin

Android : Upload image to PHP server

假装没事ソ 提交于 2019-12-07 03:20:55
问题 I have write a script to upload an image taken from camera to my server. I get 200OK response but I don't see my image on my server in uploads/ folder : Maybe my script contain an error. Could you help me please ? My example is the following link : http://androidexample.com/Upload_File_To_Server_-_Android_Example/index.php?view=article_discription&aid=83&aaid=106 Here is the compleete Android class : import java.io.DataOutputStream; import java.io.File; import java.io.FileInputStream; import