Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New version no longer works on amazon elasticbean #3

Closed
anhquan0412 opened this issue Jan 7, 2019 · 4 comments
Closed

New version no longer works on amazon elasticbean #3

anhquan0412 opened this issue Jan 7, 2019 · 4 comments

Comments

@anhquan0412
Copy link

Hi,
The previous version (Dec 30) works fine on elasticbean, but the new one does not work. The app is still deployed sucessfully, but the 'Upload and Analyze Image' button has no effect upon clicking on it. Can you take a quick look at this? Thanks!

@pankajarm
Copy link
Owner

Thanks for pointing out, Indeed it was pre existing issue where JS button property was disabled by default, I updated this with correct JS properties 2 days ago, can you please pull the latest repo?

@pankajarm
Copy link
Owner

Plus, I did test it few hours ago on AWS Beanstalk, and it work fine... LMK if you still face same issue

@anhquan0412
Copy link
Author

I believe I am on the newest version now (commit on Jan 4 is 'Merge branch master ...') and it still doesn't work on beanstalk. Can you tell me which line of code to change the JS button behavior?

@pankajarm
Copy link
Owner

Under index.html button type property is on page load is "button" instead of "submit" =>

					<button type = "button" id = "submit_btn" class="contact100-form-btn">
						<span>
							Upload & Analyze Image
							<i class="fa fa-long-arrow-right m-l-7" aria-hidden="true"></i>
						</span>
					</button>

This property changes to "submit" when user upload correctly file image type (which is png and jpeg)
under utility.js =>

function fileChange(e) {

var file = e.target.files[0];

if (file.type == "image/jpeg" || file.type == "image/png") {

    // Activate Submit Button
    el('submit_btn').type = "submit";
    document.getElementById('inp_img').value = '';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants