this is the forecast for film sales
$("input[type=file]").change(function() {
var input = $(this);
if(!!this.files && !!this.files[0]) {
var reader = new FileReader();
reader.onload = function(e) {
$("-sharppre" + input.prop("id").substr(4,2)).prop("src", e.target.result);
}
reader.readAsDataURL(this.files[0]);
}
});
this is to add a movie movie.
$(document).on("change", ".file_multi_video", function(evt) {
var $source = $("-sharpvideo_here");
$(".video_show").show();
$source[0].src = URL.createObjectURL(this.files[0]);
$source.parent()[0].load();
});
it"s just that when I wrote at the beginning, the uploading of the film and the uploading of the photo were separate:
<input type="file" name="video" class="file_multi_video upload_cover" accept="video/*">
<video autoplay muted class="video_show displayNone">
<source src="<?=$editBlog["video"];?>" id="video_here">
</video>
so there will be two uploads of input
, but I am all on the same
<input type="file" id="file02" name="cover" class="upload_cover" accept="image/jpeg, image/png, image/jpg, video/*">
it"s just that I don"t know how to integrate uploading photos when using the first function
if it"s another function on the movie?
how can this be realized?
how to judge in input change? Or is there a better way?