upload

PHP - Upload utf-8 filename

二次信任 提交于 2019-12-27 11:04:45
问题 I'm Vietnamese and i want to upload a utf-8 filename like Tên Tệp Tiếng Việt.JPG Here is my code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>utf-8</title> </head> <body> <?php if(isset($_POST["submit"])) { if($_FILES["upload"]["error"] > 0 ) echo "FILE ERROR!"; else { $base_dir = "D:/"; $fn

Type 'System.Web.HttpRequest' cannot be serialized

匆匆过客 提交于 2019-12-25 18:29:01
问题 I am trying to design an Picture Upload feature into a web site. I am using ASP.NET 3.5, C#, and WCF. I have been asked to accomplish the following: 1) Make the Uploader a Web Service 2) Return progress updates to the user as files are uploaded. 3) Log other relevant user-selected options in the database. So, I have started off by creating a WCF web client with the below service contract: IService.UploadPictures(HttpRequest request); private UploadServiceClient upload; protected void Page

get image files from directory on server for further processing

我的梦境 提交于 2019-12-25 18:23:18
问题 I have folders on the server that contain image files. I'm trying to get those files and then upload them further, but I think I'm using the wrong function. My code: $dir = "../uploads/".$folderimage."/"; if ($handle = opendir($dir)) { while (false !== ($entry = readdir($handle))) { if ($entry != "." && $entry != "..") { echo "$entry\n"; $handle = fopen($entry,"wb"); $mug->images_upload(array( "AlbumID" => "#####", "File" => $handle)); } } closedir($handle); } Not sure what I am doing, all I

what to change in this code If I want to post videos in Facebook in iPhone?

空扰寡人 提交于 2019-12-25 18:13:33
问题 I want to upload video on Facebook . for this I am using my this old code , but it is not allow me to post videos in Facebook . - (id)initWithImage:(UIImage *)upload_image { if (self = [super init]) { self.uploadImage = upload_image; } return self; } /** * this way the class is easily extensible to other file * types as FB allows us to upload them into the graph... * with little if any modification to the code **/ - (void)appendDataToBody:(NSMutableData *)body { /** * Facebook Graph API only

issue for received image in php with upload script Android

一曲冷凌霜 提交于 2019-12-25 17:46:31
问题 I use this code for upload image: http://vikaskanani.wordpress.com/2011/01/11/android-upload-image-or-file-using-http-post-multi-part/ I replaced bm = BitmapFactory.decodeFile("/data/data/fshizzle.com/files/image.jpg"); and HttpPost postRequest = new HttpPost("http://10.0.2.2/upload.php"); it's all! I can not receved info in php file I use this code php work if use html code <form method="POST" action="upload.php" enctype="multipart/form-data"> <!-- On limite le fichier à 100Ko --> <input

How can I display multiple image?

青春壹個敷衍的年華 提交于 2019-12-25 16:59:52
问题 My html code is like this : <input type='file' multiple/> <img id="myImg" src="#" alt="your image" /> My javascript code is like this : $(function () { $(":file").change(function () { if (this.files && this.files[0]) { var reader = new FileReader(); reader.onload = imageIsLoaded; reader.readAsDataURL(this.files[0]); } }); }); function imageIsLoaded(e) { $('#myImg').attr('src', e.target.result); }; Demo is like this : https://jsfiddle.net/oscar11/ob8aas23/ When I upload one image, it display

python file upload selenium

回眸只為那壹抹淺笑 提交于 2019-12-25 16:58:46
问题 I use Selenium and Python to send requests to a website. I am making a file upload right now, but it seems that it is not working as I expect it to be. Here is how to HTML looks like: <div id="uploaders" class="uploaders" data-image-urls="" data-image-ids="" data-image-positions="" data-image-checksums=""><div id="uploader-container-0" class="uploader-container small empty" data-uploader-index="0" data-numbering="1" style="position: relative;"> <div id="file-picker-0" class="uploader-box

Download user selected file/upload a file to a user selected directory both with primefaces

喜你入骨 提交于 2019-12-25 16:45:02
问题 I want to download user selected files with primefaces. I was able to do so for a specific file as described in the primface showcase for "file Download". But what I actually want is, that after pressing the "download Button" a file dialog should open, so the user can select a file for himself to download. Is that possible? My current code for a specific file download lokks like this: public void handleLanguageFileDownload() throws FileNotFoundException, IOException { FacesContext fc =

ASP.NET webAPI <--> Dojo uploader response format is wrong

本秂侑毒 提交于 2019-12-25 14:46:15
问题 i have a problem with uploading documents with dojo. I´m using the dojox/form/Uploader to upload a file withiframe mode. After uploading there is a response from the server in a special format. The uploader only works when i send it like this: Server: '{"name":"file.png","file":"filename","type":"form-data"}' But the answer is: Client: "'{\"name\":\"file.png\",\"file\":\"filename\",\"type\":\"form-data\"}'" So i think there are two possible ways to solve this problem: A. Fixing it on the

Blackberry jde : how to upload an image in server using MultipartPostData

瘦欲@ 提交于 2019-12-25 14:40:55
问题 Here is the problem I am trying to send an image to a remote server using the class MultipartPostData. I build my PostData with the following code : PostData body = new MultipartPostData(MultipartPostData.DEFAULT_CHARSET, false); body.append("deviceID", ""+DeviceInfo.getDeviceId()); body.append("synchro", "true"); body.append("shoot_lat", ""+latitude); body.append("shoot_long", ""+longitude); body.append("shoot_place", ""+city); body.append("shoot_time", String.valueOf(time)); body.append(