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

Enhance refresh method to overwrite options #1073

Closed
wants to merge 1 commit into from

Conversation

vishnukvmd
Copy link

@vishnukvmd vishnukvmd commented Sep 5, 2017

There are use cases where in after initializing the widget, we need to alter the uploadUrl.
For example, if the URL is a function of the selected file type.

This PR essentially adds a setter for this variable. Can be accessed as follows:

$('#input').fileinput('setUploadUrl', url);

There are use cases where in after initializing the widget, we need to alter the `uploadUrl`. If the URL is a function of the selected file for example.
@kartik-v
Copy link
Owner

kartik-v commented Sep 5, 2017

Have you tried using the refresh method:

$('#input').fileinput('refresh', {uploadUrl: 'your-url'});

@vishnukvmd
Copy link
Author

@kartik-v Yes, but this does not update the URL. It continues to upload it to the URL that was initially set.

@kartik-v kartik-v changed the title Add functionality to set the uploadUrl Enhance refresh method to overwrite options Sep 5, 2017
@kartik-v
Copy link
Owner

kartik-v commented Sep 5, 2017

I have changed the title of this issue to offer a more generic approach to achieving such need and will update with an enhancement.

@vishnukvmd
Copy link
Author

Yes, having a generic way to update all configuration parameters would definitely be better than this. Thanks.

@kartik-v
Copy link
Owner

kartik-v commented Sep 9, 2017

Resolved via updates to release v4.4.4.

@kartik-v kartik-v closed this Sep 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants