upload

Possible to resize an image (client side) on an html form before upload?

走远了吗. 提交于 2019-11-29 09:40:07
问题 I have a standard html input form that includes a field for uploading a file (image). I unfortunatly cannot edit the backend php that processes the file, but I need to resize the images to a certain size. I was thinking I could pull off this trick by having the images resized by jquery or alternative client side methods, on the form, before the actual submission to the PHP form. Is this possible? Anyone know of a good method? Thanks!!! 回答1: You can use the new FileReader to let the user

Call to undefined function exif_imagetype()

天大地大妈咪最大 提交于 2019-11-29 09:21:32
I am trying to get Mime-Type for image-types as follow: if(!empty($_FILES['uploadfile']['name']) && $_FILES['uploadfile']['error'] == 0){ $file = $_FILES['uploadfile']['tmp_name']; $file_type = image_type_to_mime_type(exif_imagetype($file)); switch($file_type){ // Codes Here } } But it always gives the error Call to undefined function exif_imagetype() . What am I doing wrong here? Enable the following extensions in php.ini and restart your server. extension=php_mbstring.dll extension=php_exif.dll Then check phpinfo() to see if it is set to on/off aesede I think the problem is PHP config and/or

Upload a folder in ASP.NET of Flash or Silverlight

扶醉桌前 提交于 2019-11-29 09:01:25
Is there any way to upload entire folder (a folder) in asp.net? Is there any way to upload in Flash or Silverlight? You can use Flash (and probably Silverlight) to select all the files in a folder to upload, however you cannot select a folder or recurse folders. Here is an exmaple that uses flash as the visual front end: http://www.codeproject.com/KB/aspnet/FlashUpload.aspx Here is an example that uses flash for the multiple file upload by uses JQuery for the visuals: http://www.uploadify.com/demo/ In order to achieve selecting folders you will need to build an ActiveX control or Java Applet

Upload image with facebook API

徘徊边缘 提交于 2019-11-29 08:52:43
Question: How to upload an image from my webserver to facebook via FB API? I'm writing an application that retrieves images from the user's photo album, makes some modifications (e.g. adding a watermark) then send it back to photo album. The code I use to upload the photo is as follows <?php include_once("api/facebook.php"); include_once("config.php"); include_once("utils.php"); include_once("bemyfans.php"); $facebook=new Facebook($api_key,$app_secret); $facebook->require_frame(); $user=$facebook->require_login(); echo "<p>Hello <fb:name useyou='false' uid=\"$user\"/></p>"; $args = array( 'api

Implementation of fully functional media uploading in web application

末鹿安然 提交于 2019-11-29 08:49:44
Suppose we have the web application which handle create, read, update and delete articles and each article should have gallery of images. I have to make one to one relation between Article and Gallery and one to many relation between Gallery and Media. HTML5 gives a lot of features like multiupload, so I want to use this excellent http://blueimp.github.io/jQuery-File-Upload/ plugin for that. The problem is how to handle the file upload "in memory" like other form's data? For example when we show the page for create new article we should be able to fill in article's data fields and select

Upload things to a FTP in Objective-C iOS

淺唱寂寞╮ 提交于 2019-11-29 08:44:05
Some days ago I was asking how to download files from a FTP and I solver my problem with NSData and dataWithContentsOfURL of this kind: ftp://user:pass@server/path/of/file.extension But now I need to upload a file, and I was wondering if there is any instruction to upload files through an URL but I think it could not be possible and many many libraries I saw for iOS use PHP and I don't want it, and SimpleFTPSample from Apple is so confusing for junior developers that I could not understand nothing, so a simple code to upload a file specifying URL, Path, File, user and pass? If you would like

Dev C++ Wininet Upload file using HTTP

孤者浪人 提交于 2019-11-29 08:42:48
I want to upload "C:\test.txt" to webserver, when I am running program, file is not uploading and I am not getting any error. the complete C++ code can be find here and php code on webserver can be find here: " http://student114.110mb.com/upload.txt " or " http://student114.110mb.com/upload.php " kindly help me where I am doing wrong #include <windows.h> #include <wininet.h> #include <tchar.h> #include <iostream> #pragma comment(lib,"wininet.lib") using namespace std; int main() { static TCHAR frmdata[] = "-----------------------------7d82751e2bc0858\nContent-Disposition: form-data; name=\

Intervention \\ Image \\ Exception \\ ImageNotWritableException using Laravel 4

感情迁移 提交于 2019-11-29 08:00:48
I am using Laravel 4. I am not sure why I am getting this error when everything seems to be correct. Also, the product is not updating to the database. Error: Intervention \ Image \ Exception \ ImageNotWritableException Can't write image data to path [/img/products/1396668877.jpg] Snippet of ProductsController where product object is created: public function postCreate() { $validator = Validator::make(Input::all(), Product::$rules); if ($validator->passes()) { $product = new Product; $product->category_id = Input::get('category_id'); $product->title = Input::get('title'); $product->description

how to get full path for upload a file in jsp?

时间秒杀一切 提交于 2019-11-29 07:53:13
In my jsp page, use file uploading and pass file for string to java page for copy to particular folder. I want whole path for copying my file. but i get only a file name with extension. scan file : ABC.pdf it show only : ABC.pdf i want to show: c:/abc.pdf JSP is indeed a Server side technology. Here are few of the links to do a file upload using JSP. http://www.tutorialspoint.com/jsp/jsp_file_uploading.htm http://corejavaexample.blogspot.in/2013/04/how-to-upload-file-in-jsp.html http://javarevisited.blogspot.in/2013/07/ile-upload-example-in-servlet-and-jsp-java-web-tutorial-example.html Hope

How to load Blobproperty image in Google App Engine?

社会主义新天地 提交于 2019-11-29 07:42:30
I wrote some codes. I could save image in BobProperty. But I cannot load image into HTML page... source code: class Product(db.Model): image = db.BlobProperty() ... class add: productImage = self.request.get('image') product.image = db.Blob(productImage) product.put() but i wrote {{product.image}} into html code. But there were like ��袀 ���� ���� ���� (����������� ��(:(������� (������� (��>̢��� (�������>������Y������K��׏ What should i do if i want load image from datastore? I use an auxiliary view: def serve_image(request, image): if image == "None": image = "" response = HttpResponse(image)