in Education by
Angular js Image upload how to check width and height example my withd=200 and heidht =200 if give more than pixel its show be error how can i us it if i try some thing can solve it HTML

JS $scope.fileList1 = []; $scope.add1 = function(file1) { console.log(file1); for (var i = 0; i < file1.length; i++) { if (file1[i].type == 'image/jpeg' || file1[i].type == 'image/jpg' || file1[i].type == 'image/tif' || file1[i].type == 'image/tiff') { var item = { name: file1[i].name, file: file1[i] }; $scope.fileList1.push(item); var f = file1[i], r = new FileReader(); console.log($scope.fileList1); r.onloadend = function(e) { } r.readAsDataURL(f); } else { $('#file1').val(''); Notify.alert('Upload only .jpeg,jpg,tiff,tif format file', { status: 'warning', pos: 'top-right', timeout: 3000 }); } } }; JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
You can use ng-flow (a library to upload file on AngularJS), and check image dimension in its flow-file-added/flow-files-added handler. Here is an example by AidasK: https://github.com/flowjs/ng-flow/issues/126

Related questions

0 votes
    I am trying to change an image depending on what option is selected in a drop down menu. I am ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 1, 2022 in Education by JackTerrance
0 votes
    I'm trying to assemble and display image slices which have been preloaded into a two dimensional array, but ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    name any four tools in Gimp used for changing the pixel arrangement in an image Select the correct answer from above options...
asked Dec 24, 2021 in Education by JackTerrance
0 votes
    Course Results (${courseResponseList.getCourses().size()}) Want to show above div. jquery script. jQuery. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 6, 2022 in Education by JackTerrance
0 votes
    Course Results (${courseResponseList.getCourses().size()}) Want to show above div. jquery script. jQuery. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 20, 2022 in Education by JackTerrance
0 votes
    I am trying to load a log-out URL once the app close button is hit, Something like the following. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 13, 2022 in Education by JackTerrance
0 votes
    Different JavaScript Questions and Answers...
asked Sep 17, 2022 in Technology by Editorial Staff
0 votes
    I've created a getSpectrum method using the getByteFrequencyData method on the Web Audio API's Analyser Node ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 27, 2022 in Education by JackTerrance
0 votes
    This is part of the component : import MyComp from '../../lib/MyComp' const Data = ( { data } ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 26, 2022 in Education by JackTerrance
0 votes
    Have jquery dialog as closeOnescape as false. want to trigger an event based on esc key press how do ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I am trying to convert string into integer using jquery but it throwing NumberFormatException. How to fix it ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I found found several question's answers similar to this, I tried some of them, but no luck. May ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    This is part of the component : import MyComp from '../../lib/MyComp' const Data = ( { data } ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I am trying to use ES2017 async/await syntax with Babel. In package.json, I have "babel": { " ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 14, 2022 in Education by JackTerrance
0 votes
    This question already has answers here: How to split a string with angularJS (4 answers) Closed 5 years ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 14, 2022 in Education by JackTerrance
...