upload

AjaxFileUpload return download panel when data is json

无人久伴 提交于 2019-12-07 23:59:40
问题 I use AjaxFileUpload (http://www.phpletter.com/Our-Projects/AjaxFileUpload/ ) to upload a file and get json result type response in struts2 ( code.google.struts2jsonresult.JSONResult ) but browser always pop-up download pane, plz give me some suggestions, thanks in advance Here is my config in struts.xml : ...... <result-type name="json" class="code.google.struts2jsonresult.JSONResult"> ............ <action name="doGetList" method="doGetList" class="main.java.GetListAction"> <result type=

jQuery upload plugin to work with JSP/Java

爷,独闯天下 提交于 2019-12-07 22:28:19
问题 I'm trying to accomplish the following: Upload a file to the application by submitting a form (enctype: multipart/form-data) to a JSP action which handles the rest (including writing the file to the disk, processing and returning some xml data about the upload). Until recently, I was using this plugin: http://valums.com/ajax-upload/ This does not work well for two reasons: it breaks on Internet Explorer the code is written in half jquery, half native javascript and not in your usual plugin

vue express uploading multiple files to amazon s3

筅森魡賤 提交于 2019-12-07 22:21:09
问题 i need a help on how to upload multiple files image on amazon S3. i let's say that i have three input like this <template lang="html"> <form enctype="multipart/form-data" @submit.prevent="sendFile"> <input type="file" ref="file1" @change="selectFile1"> <input type="file" ref="file2" @change="selectFile2"> <input type="file" ref="file3" @change="selectFile3"> <div class="field"> <button class="button is-info">Send</button> </div> </form> </template> and my frontend vue script looks like this

Uploading mp4 files using PHP

梦想的初衷 提交于 2019-12-07 19:47:55
问题 I am able to upload png/jpegs/images using PHP upload script but am not able to upload mp4 files on my local server. Script is not displaying any error. <?php ini_set('display_startup_errors',1); ini_set('display_errors',1); error_reporting(-1); //include authentication here/ Gmail is good solution for now //check if it's not allowing any other extenstion other than MP4 $allowedExts = array("gif", "jpeg", "jpg", "png","mp4"); $temp = explode(".", $_FILES["file"]["name"]); print_r($_FILES[

Jquery / HTML5 / Ajax upload progress bar?

三世轮回 提交于 2019-12-07 18:49:59
问题 I'm working on a simple S3 uploader, got it to perform and do what I need to do; however, I was wondering if there was an easy to create an upload progress bar? At the bottom of the browser, there is a browser message that says "Uploading" - is there any articles anyone knows about that piggy-backs off of this to display a loading bar? Ideally, that variable will be passed to a jquery function that renders the percentage in the bootstrap progressbar (which accepts integers). The goal here is

Corrupt image file after uploading it using ftp command from linux, with type ASCII

£可爱£侵袭症+ 提交于 2019-12-07 18:44:50
问题 I have try to transfer a image file using ftp command in linux, from linux platform to windows platform, doing like this: ftp cs.unitbv.ro ascii get test.jpg After this, when I open the image it says that the file is corrupted. If somebody know how to repair the image file let me know. Thanks 回答1: transfer it as binary otherwise it will get corrupted as newlines are converted, for example. 回答2: Try transferring it using binary mode. 来源: https://stackoverflow.com/questions/1601872/corrupt

Uploading images with PHP and hitting the script memory limit

我是研究僧i 提交于 2019-12-07 18:25:28
问题 I am trying to upload a JPG image using a PHP script, but the image is keeps causing my script to time out and die giving this error: Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2136 bytes) in image.php on line 38 How can I prevent the upload from taking place if the image is too big, or have this error fail gracefully? 回答1: The actual problem is not with the initial file size but with the dimensions of the image itself (height width colorDepth), since you

Uploading 100KB+ zip files gives an Internal Server Error

两盒软妹~` 提交于 2019-12-07 17:56:57
问题 Here's my HTML code although I think it's irrelevant: <form enctype="multipart/form-data" action="../developers/submit.php" method="post"> <input name="product_zip" type="file" /><input type="hidden" name="MAX_FILE_SIZE" value="20000"> </form> The reason I say it's irrelevant is that I can upload zip files under 100kb. I get a 500 internal server error on zip files over 100kb. Everything else works over 100kb, png, gif, newly created zip files, etc. I've checked all my PHP ini settings.

Upload images to remote servers. PHP

若如初见. 提交于 2019-12-07 17:02:29
问题 I do the image hosting and I have a problem.. I have 3 servers. First - Site/script Any two servers for images. How I Can upload image from "one" server (script) to second and third servers? <?php if (isset($_POST['upload'])) { $blacklist = array('.php', '.phtml', '.php3', '.php4', '.php5'); foreach ($blacklist as $item) { if(preg_match('#' . $item . '\$#i', $_FILES['file']['name'])) { echo "We do not allow uploading PHP files\n"; exit; } } $uploadDir = PROJECT_ROOT . 'upload/'; // 1ST SERVER

Videos won't upload

北城以北 提交于 2019-12-07 16:47:26
I'm trying to upload some videos using PHP. But I can't get them into any folder. I don't get errors, so I don't know where to start. My code: <?php if(isset($_FILES['files'])) { foreach ($_FILES['files']['tmp_name'] as $key => $tmp_name) { move_uploaded_file($tmp_name, "upload/{$_FILES['files']['name'][$key]}"); } } ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Uploading videos</title> </head> <body> <div> <form action="" method="post" enctype="multipart/form-data"> <p> <input type="file" name="files[]" multiple="multiple" min="1