Search the Community

Showing results for tags 'upload'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 21 results

  1. While uploading a video, not uploading but image and files are uploading. The array after showing array Array( [file] => Array ( [name] => vlc-record-2016-05-08-21h02m18s.mp4 [type] => [tmp_name] => [error] => 1 [size] => 0 )) can any one please help me.
  2. Hi, I'm new to writting code & looking to write a couple of secure web pages. One where you can log in & out securely using a password. Then a second where you can upload & download some files or folders. Any help on where to start, what code (asp/etc) & what best method(s) of encryption I should use? Thanks for any help or advice. Old Guy.
  3. I try to create an Upload with javascript nad progress bar. i found this code in the internet, but i can't change the code for my idea. This is the script sample: var client = null; function uploadFile(){ //Wieder unser File Objekt var file = document.getElementById("fileA").files[0]; var formData = new FormData(); client = new XMLHttpRequest(); if(!file) return; formData.append("datei", file); client.onerror = function(e) { alert("onError"); }; client.open("POST", "upload.php"); client.send(formData);} my first problem is, that the autor used ONE input tag an set no MULTIPLE. I have a multiple input tag. I think it's enoug to change: var file = document.getElementById("fileA").files[0]; to var file1 = document.getElementById("file1").files; //dlete [0] for all files and formData.append("datei", file); to formData.append("file1[]", file);// add [] to create an array is this correct? AND MY IMPORTANT PROBLEM is, that i have more input tags: <form> <input type="file" name="file1"> <input type="file" name="file2"> <input type="file" name="file3"> </form> How can i pass the code for mulitple tags with different names??????? I search since 4 days for an idea. It will be perfect, if i can send all input with ONE clinet. IT's really important to read the files with $_FILES[file1], $_FILES[file2]
  4. wrong topic, sorry
  5. Does anyone know of a good videoformat uploader, such as jwplayer, that i can use on my website to allow users to upload video. I tried jwplayer but i got so many problems whit it, and i think its bad. Any suggestions?
  6. this is my video upload script, and i have inserted a max file size check, but i doesnt seem to work, every time i upload a script that is larger than 2mb it checkes the other if statment on the script,, which is wheter or not the user has filled out the forms script: $form =" <form action='upload.php' method='POST' enctype='multipart/form-data'> <input type='text' name='title' placeholder='Title' /> <br /> <textarea rows='8' cols='30' name='description'></textarea><br /> <input type='file' name='file' /><br /> <input type='submit' name='submit' /> </form>"; echo $form; $title = mysql_real_escape_string(htmlentities($_POST['title'])); $description = mysql_real_escape_string(htmlentities($_POST['description'])); if($_FILES["file"]["size"] < 10000000) { if($title && $description) { $path = pathinfo($_FILES['file']['name']); $allowed = array('jpg','jpeg','gif','png','swf','MP4','flv','mgp','mpeg','webm','rm','ram','mov','wmv','avi','MPEG-4'); if(in_array($path['extension'],$allowed)) { include "connect.php"; $name = $_FILES['file']['name']; $temp = $_FILES['file']['tmp_name']; move_uploaded_file($temp, "upload/".$name); $url = "http://localhost:81/upload/$name"; mysqli_query($con, "INSERT INTO videos VALUES('','$title','$name','$url','$description')") or die(mysql_error()); echo "<p>You're file has been uploaded.</p> <br />"; mysqli_close($con); } else { echo "<p>must be a video or a picture</p> <br />"; } } else { echo "<p>You must fill out the form.</p> <br />"; } } else { echo "<p>You're file is to big.</p> <br />"; } } else { echo "<p>You must be logged in, in order to upload a file.</p><br />"; }
  7. Hi, I would like to use <input type=file> to allow user to upload file (pictures, pdf...) and save them as varinary on SQL server. I can do it using asp.net but want to use html5 and javascipt. I imagine it will take some sort of ajax call to a web service written in vb.net. Does someone have an example?or a resoource? My specific questions are how to get the file from the <imput> and pass that file to web service? Thanks John
  8. Hello, I have the following code in a file called upload_file.php: <?php if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br>"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br>"; echo "Type: " . $_FILES["file"]["type"] . "<br>"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>"; echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br>"; $filename = $_FILES["file"]["name"]; $filetype = $_FILES["file"]["type"]; $title = $_POST['title']; $content = $_POST['content']; $image_pos = $_POST['image_pos']; $publisher = $_POST['publisher']; mysqli_query($con,"INSERT INTO news (title,content,image,image_pos,publisher) VALUES ('{$title}','{$content}','{$filename}','{$image_pos}','{$publisher}')"); if (file_exists("upload/" . $_FILES["file"]["name"])) { echo $_FILES["file"]["name"] . " already exists. "; } else { move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $_FILES["file"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file"]["name"]; } }?> and I get the following error: Can someone please help me, my file permissions in the upload folder are 777 and the directory exists. Can you please help with the SQL problem and the File upload? Thanks in advance!
  9. Hello, Can anyone show me a demo of a code, I'm looking for a form that uses text and file upload. I need a form that has details such as title and content, but I also want an image upload where it saves the file to my FTP server in a folder called Uploads and then it saves the filename and extension to the database, along with the other details from the form. Can anyone give me the code and explain it please! Thanks in advance.
  10. I have the following script based on the example script on http://www.w3schools.com/php/php_file_upload.asp . I get the following error now that I my host upgraded the server to PHP 5.5.The error:Strict Standards: Only variables should be passed by reference in /public_html/uploads/upload_file.php on line 7The code: $allowedExts = array("jpg", "jpeg", "pjpeg"); $extension = end(explode(".", $_FILES["file"]["name"])); if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/jpg") || ($_FILES["file"]["type"] == "image/pjpeg")) && ($_FILES["file"]["size"] < 3000000) && in_array($extension, $allowedExts)) { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br>"; } else { $filename = (rand() * rand()); while (file_exists("images/" . $filename . ".jpg")) $filename = rand() * rand(); move_uploaded_file($_FILES["file"]["tmp_name"], "images/" . $filename . ".jpg"); /* write desc */ $myFile = $filename . ".txt"; $fh = fopen("images/" . $myFile, 'w') or die("can't open file"); fwrite($fh, "age: " . $_POST['age'] . "rn"); fwrite($fh, "religion: " . $_POST['religion'] . "rn"); fwrite($fh, "country: " . $_POST['country'] . "rn"); fwrite($fh, "desc: " . $_POST['desc'] . "rn"); fwrite($fh, "usage: " . $_POST['usage'] . "rn"); fwrite($fh, "time/date: " . date("Y-m-d H:i:s") . "rn"); fclose($fh); } } else { echo "um, eror"; } Can anyone tell my why I get this error and how to fix it? Thanks, Yoni
  11. hello.... I have file foto with name : my foto You.flv_snapshot_00.18_[2013.06.24_12.12.05].jpg I have do upload that foto , the picture move to directori but not save in database.... I think the problem lies name my picture ... .. How to rename foto be name valid more .. thnks Regards ...
  12. I want to upload multiple files only with php.for example like my picture.when pressing the Add button, the file appears under the Add button.and after selecting a file, press the update button when the data is saved to the database.I want your help.I was confused to find references to complete my work.thank you
  13. So i have this website wich i first uploaded on a private free web hosting server. Now some images do not show, and i first thought it got to do with tĀ“because it is a slow free server! But that was not the problem since i now uploaded it on fast pay web hosting domain. This one: http://iphonetryck.se/index.php The images are not shown there either! I tried everything i know from making all the images small equaly(because UNIX does not recognise with one big and rest small or something like that...), to make the pictures from indexered to RGB, or to jpg. Neither work! I need help on to why this is happening. I tried to reupload also btw. I attach a picture on how it is suppose to look like - on the index startpage. As you see the index picture to the top left is not there, and the colorimages for the menylinks is not there either. Also some other pictures like the iphone too in one other page.
  14. Hello W3S people again. once again im in a little need of help. at least to get it started, im a little lost in this matter...im in the half-way exams at this week. and we got told to make a admin system that could upload images to products... that part i (CAN) do...but here comes my problem... i dont know the part of resizing the images...any ideas or suggestions would be pretty awsome! and thats not for kidding...i just need a little help for the beginning of it, so i can see the syntax... Hoping answers or suggestions soon!... thanks alot in advance! .
  15. Hi looking for a bit of help, I'm trying to create an upload script that send file to a directory named in the form "uploads/images/$company" I'm not bothered if the dir already exists The issue I'm have is the uploaded files don't end up in the directory set by "$company" they end up in the "images level Any help or advice would be great, its driving me made Cheers Chris <?php //testing postecho "$_POST[nouploads]";echo "<br />";echo "$_POST[company]";//posted from form$nouploads = "$_POST[nouploads]";$company = "$_POST[company]";//make a dir with the same name as company//does not matter if it already existsif (!file_exists ( "uploads/image/$company" )) {mkdir("uploads/image/$company", 0777, true);}error_reporting(E_ALL); //directory to upload to $upload_dir= "uploads/image/$company"; //numver of files to upload passed by form $num_uploads = "$nouploads"; //maximum filesize allowed in bytes $max_file_size = 2000000; //the maximum filesize from php.ini $ini_max = str_replace('M', '', ini_get('upload_max_filesize')); $upload_max = $ini_max * 2000000; //a message for users $msg = 'Please select files for uploading'; //an array to hold messages $messages = array(); //check if a file has been submitted if(isset($_FILES['userfile']['tmp_name'])) { //loop through the array of files for($i=0; $i < count($_FILES['userfile']['tmp_name']);$i++) { //check if there is a file in the array if(!is_uploaded_file($_FILES['userfile']['tmp_name'][$i])) { $messages[] = 'No file uploaded'; } //check if the file is less then the max php.ini size elseif($_FILES['userfile']['size'][$i] > $upload_max) { $messages[] = "File size exceeds $upload_max php.ini limit"; } //check the file is less than the maximum file size elseif($_FILES['userfile']['size'][$i] > $max_file_size) { $messages[] = "File size exceeds $max_file_size limit"; } else { //copy the file to the specified dir if(@copy($_FILES['userfile']['tmp_name'][$i],$upload_dir.'/'.$_FILES['userfile']['name'][$i])) { //give praise and thanks to the php gods $messages[] = $_FILES['userfile']['name'][$i].' uploaded'; } else { //an error message $messages[] = 'Uploading '.$_FILES['userfile']['name'][$i].' Failed'; } } } }?><!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" xml:lang="en" lang="en"><head><title>Multiple File Upload</title></head><body><h3><?php echo $msg; ?></h3><p><?php if(sizeof($messages) != 0) { foreach($messages as $err) { echo $err.'<br />'; } }?></p><form enctype="multipart/form-data" action="upload3.php" method="post"><input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max_file_size; ?>" /><?php $num = 0; while($num < $num_uploads) { echo '<div><input name="userfile[]" type="file" /></div>'; $num++; }?><input type="submit" value="Upload" /></form></body></html>
  16. hello w3schools again, i just have a question this time .today i was trying to adding a upload script to my personal website . by following this tutorial: http://www.w3schools.com/php/php_file_upload.asp so here is my question.if im doing the saving part ''with'' the restrictions on it. what is the syntax for uploading a .torrent/.php/.html/ect file... i mean, before a filetype, there is somfthing that needs to be typed, like now, (image) ect...what is the syntax for making the part of a PHP and TORRENT file. thanks in advance.Hoping answers soon.
  17. Hello everybody Im wondering how can you make page that displays every .jpg, .gif & .pdf files from directories on website table. Im not sure what coding language i have to use, but i think its mostly html. PHP & javascript code will be accepted too. Found solution after some research: http://www.brightcherry.co.uk/scribbles/php-list-all-files-in-a-directory/
  18. How do I get php to put the contents, and only the contents, of a file being uploaded into an array?
  19. On the folder where i upload the pdf, the code to view it is this however i believe the code to view it on the other folder on the serve would be but it is not working can someone help please
  20. I wrote a simple HTML web page on my home computer. It appeared fine as both a .txt and .html. But when I transferred (FTP via FileZilla or Core) it to the webhost (GoDaddy) the text was changed and the webpage contained symbols and Chinese characters. http://www.scottyproductions.org/Blog.html. Main site: www.Scottyproductions.org. I finally was able to upload the web pages directly throught the GoDaddey FTP so they are now working/displaying the text properly. I can't figure out why my script changes when it is uploaded to the webhost by FiliZilla or CORE FTP but not by GoDaddy. When you open the "View" Source" from the website, there are many characters which were not in the original script. GoDaddy says that their server is working properly. I have re-downloaded the current FileZilla program; and this also happens when I use Core FTP. I have deleted the file on the server and overwritten and re-transferred the one from my computer (with normal script) but this has not helped. When the HTML page or TXT file appear on the server they contain unusual character. Any idea why or how it can be corrected. It has now been uploaded and works fine so the web pages are OK.
  21. Hello,I had created a form for users to upload their resumes (only word documents & 1 MB allowed as size), then email it after its been successfully uploaded.Any help?Thanks in advance