Upload Image Form

Developer
Size
2,689 Kb
Views
30,360

How do I make an upload image form?

What is a upload image form? How do you make a upload image form? This script and codes were developed by Parth Viroja on 03 September 2022, Saturday.

Upload Image Form Previews

Upload Image Form - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Upload Image Form</title> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="upload-image-div"> <input type="text" name="link" placeholder="https://www.arduino.cc/" /> <input type="text" name="title" placeholder="Arduino : opensource hardware prototype" /> <ul> <li> <label class="drop-img default"> <input type="file" class="file" name="userfile[]" /> <img src="" /> </label> <div class="option"> <i class="material-icons clear">clear</i> </div> </li> <li> <label class="drop-img default"> <input type="file" class="file" name="userfile[]" /> <img src="" /> </label> <div class="option"> <i class="material-icons clear">clear</i> </div> </li> <li> <label class="drop-img default"> <input type="file" class="file" name="userfile[]" /> <img src="" /> </label> <div class="option"> <i class="material-icons clear">clear</i> </div> </li> <li> <label class="drop-img default"> <input type="file" class="file" name="userfile[]" /> <img src="" /> </label> <div class="option"> <i class="material-icons clear">clear</i> </div> </li> </ul> <input type="text" name="tag" placeholder="#arduino, #hardware" />
</div> <script src='http://code.jquery.com/jquery-1.11.3.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Upload Image Form - Script Codes CSS Codes

* { padding: 0px; margin: 0px; outline: none; font: 18px "Calibri"; font-weight: lighter; list-style-type: none; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
}
body { background: #e39900; overflow: hidden; overflow-y: auto;
}
input { position: relative; display: block; width: 100%; padding: 10px; min-width: 100%; max-width: 100%; border: 0px; margin: 12px auto; border-bottom: 1px solid #efefef;
}
input[type="file"] { display: none;
}
.upload-image-div { opacity: 1; display: block; margin: 10% auto; width: 20%; min-width: 436px; padding: 6px 20px; background: #fff; box-shadow: 4px 0px 0px rgba(0, 0, 0, 0.2), -4px 0px 0px rgba(0, 0, 0, 0.2);
}
.upload-image-div ul { display: block; text-align: center; margin-bottom: 10px;
}
.upload-image-div ul:after { content: ''; display: block; position: relative; clear: both; text-align: center;
}
.upload-image-div ul li { position: relative; float: left; display: inline-block; padding: 4px;
}
.upload-image-div .drop-img { position: relative; display: block; padding: 4px; width: 90px; height: 90px; max-width: 90px; max-height: 90px; border: 2px dashed #dfdfdf; cursor: pointer;
}
.drop-img.default { background: url("https://iot-pvlabs.rhcloud.com/files/image/upload.png") no-repeat center center;
}
.upload-image-div ul { margin-bottom: 10px;
}
.upload-image-div img { position: relative; display: block; height: auto; max-width: 100%; max-height: 90px; display: none;
}
.upload-image-div .option { position: absolute; display: block; padding: 4px 0px; left: 0; right: 0; top: 0; padding-top: 40%; bottom: 0; background: rgba(255, 255, 255, 0.4); text-align: center; cursor: pointer; display: none;
}

Upload Image Form - Script Codes JS Codes

$(".file").change(function() { var _ = this; if (_.files && _.files[0]) { var reader = new FileReader(); reader.onload = function(e) { $(_).parent("label").removeClass("default").find("img").attr({ src: e.target.result }).show(); $(_).parents("li").find(".option").show(); } reader.readAsDataURL(_.files[0]); }
});
$("i.clear").click(function() { var _ = $(this); _.parents("li").find("input[type=file]").attr({ value: '' }); _.parents("li").find("label").addClass("default"); _.parents("li").find("img").hide().attr({ src: "" }); _.parent(".option").hide();
});
Upload Image Form - Script Codes
Upload Image Form - Script Codes
Home Page Home
Developer Parth Viroja
Username parthviroja
Uploaded September 03, 2022
Rating 3
Size 2,689 Kb
Views 30,360
Do you need developer help for Upload Image Form?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Parth Viroja (parthviroja) Script Codes
Create amazing art & images with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!