image-uploading

Flask image upload in HTML?

陌路散爱 提交于 2019-12-10 12:24:01
问题 So, I wanted to upload an image in my website(HTML). The box does show up when I run the code but it does not show the image, instead it shows the image name. This is the code I used: app = Flask( name ) <img src="{{ url_for('static', filename='image.jpg') }}" alt="image.jpg" width=208 length=284> I did try putting my image and code in the directory : /html/static I even tried a code as simple as this but it didn't work: from flask import Flask app = Flask(__name__) @app.route('/new') def new

Uploading images using php, but without page refresh

回眸只為那壹抹淺笑 提交于 2019-12-10 12:17:47
问题 So generally, i don't have a problem (yet), but I need advice. I want't to make a page where a user can upload his/hers image. But the upload should not refresh the page as the other data that a user enters will get lost. I know there is a bunch of ajax and php uploader posts, but here's the thing. Using XMLHttpRequest 2 isn't supported in older browsers. I would like at least IE9 to be supported. I also know there is an iframe solution. But using iframe's today sounds to me like driving Mr

unable to upload image using codeigniter

雨燕双飞 提交于 2019-12-10 11:49:11
问题 Please help me. This is my first project in php Codeigniter. Actually i am a Java developer. I want to upload two image path into my table and its image into my root folder eg uploads I have many fields in the same table other then images. I am able to add/edit those fields from my form.(i implemented succussfully using codeigniter) But currently I am facing problem in image upload. I don't know exactly how to upload images using codeigniter. I tried to do it by myself since Two days but i

How do I upload an image to a ServiceStack service?

為{幸葍}努か 提交于 2019-12-10 11:48:00
问题 I have the path of an image, and use the following code to send it to my server; HttpWebRequest client = (HttpWebRequest)WebRequest.Create("http://212.175.132.168/service/api/upload/cab.jpg"); client.Method = WebRequestMethods.Http.Post; // the following 4 rows enable streaming client.AllowWriteStreamBuffering = false; client.SendChunked = true; client.ContentType = "multipart/form-data;"; client.Timeout = int.MaxValue; using (FileStream fileStream = System.IO.File.OpenRead (filePath)) {

How to add image into a post in django

て烟熏妆下的殇ゞ 提交于 2019-12-10 09:32:53
问题 I'm building an blog system, which allow user add image to their blog. when user add image, the image will be upload automatically, this happened before the blog is posted, so how should I handle the uploaded image, these image is kind of like temporary image, because if the user post the blog, these images will have an foreign key to this blog , and saved into some folder,but if the user discard the blog , these temporary images should be deleted. the problem is how to get the firstly

HTML input file on iOS app, disable “take photo” option

别来无恙 提交于 2019-12-10 01:11:51
问题 I want to disable the "Take Photo" option in an iOS app (WKWebView based) and force users to select photos from library or iCloud. I can force users to use the camera by the capture boolean attribute: <input type="file" accept="image/*" multiple capture> But, I can't found anything similar to do exactly the opposite (disable camera). Is that possible with any other HMTL attribute or a different value for capture ? Similar question was asked here: How to disable take photo on file input iOS 6,

Unable to Upload Image to Server ios

北战南征 提交于 2019-12-09 18:44:14
问题 Hello I am trying to upload Image From my IOS device to server. And Here Is my code to upload the Image - (IBAction)btnUpload:(id)sender { if (self.imageViewGallery.image == nil) { UIAlertView *ErrorAlert = [[UIAlertView alloc] initWithTitle:@"Wait" message:@"Please Select An Image To Upload." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; [ErrorAlert show]; NSLog(@"error"); } else{ NSData *imageData = UIImageJPEGRepresentation(self.imageViewGallery.image, 90); NSString

Detecting if the user drops the same file twice on a browser window

流过昼夜 提交于 2019-12-09 12:33:49
问题 I want to allow users to drag images from their desktop onto a browser window and then upload those images to a server. I want to upload each file only once, even if it is dropped on the window several times. For security reasons, the information from File object that is accessible to JavaScript is limited. According to msdn.microsoft.com, only the following properties can be read: name lastModifiedDate (Safari also exposes size and type ). The user can drop two images with the same name and

How to upload image to another server?

瘦欲@ 提交于 2019-12-09 06:27:33
问题 I want to create an application server that serves html content which contains links to static images served by another server on a different domain. The images are uploaded by users through the application server. This is what I would do to upload a JPEG file to the application server: if(!file_exists("folder_name")) mkdir("folder_name", 0770); $temp_file = $_FILES['image']['tmp_name']; $im = imagecreatefromjpeg($temp_file); $destination = "folder_name/file_name.jpg"; imagejpeg($im,

Rails image upload security

拟墨画扇 提交于 2019-12-08 18:14:26
Currently, I adopt Carrierwave for users to images. However, I hardly find a solution for image security, i.e. how to set image authorisation for the uploaded images to only let certain user in the same group to view? After digging Facebook's implementation, I observe that they inject these params (oh,oe, __gda_) to the image url ?oh=924eb34394&oe=55E07&__gda__=1436393492fc8bf91e1aec5 Is there any similar implementation for carrierwave or paperclip ? Thanks I worked quite a bit with this (only with Paperclip). There is one solution that is okay, but it takes a lot of processing. If you only