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

Fixed aliases for images and fixed broken preloader #13

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

armandeg
Copy link

@armandeg armandeg commented Oct 2, 2019

There was no Alias specified - for the people who use localhost as their dev environment - the current code didnt work. I implemented a fix specifically for this.

Also - the native Javascript was broken and changed it to use JQuery instead. This way is works as you wanted it to. :)

Copy link
Owner

@onmotion onmotion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a @web alias is a good deal. But why do we need to use JQuery instead of native js?

@@ -152,6 +152,7 @@
});

inputField.on('fileunlock', function(event, data, previewId, index) {
inputField.fileinput('upload');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fileunlock event is triggered when the upload process is completed (successfully or with error). Why do we need to call upload?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not upload at all.
All that happens on my side is it reloads - without a POST.
When I call the upload function - it uploads with no errors.

According to the documentation - this is only triggered after an upload - I understood this wrong. However - its not uploading at all.
https://plugins.krajee.com/file-input/plugin-events#fileunlock

Please allow me a few minutes to fix this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also - the preloader just loads into infinity.
If I use JQuery - it works like a charm.

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

Successfully merging this pull request may close these issues.

None yet

2 participants