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

No way to change the upload URL? #54

Closed
hauru opened this issue Mar 13, 2014 · 1 comment
Closed

No way to change the upload URL? #54

hauru opened this issue Mar 13, 2014 · 1 comment

Comments

@hauru
Copy link

hauru commented Mar 13, 2014

One more issue related to Google App Engine and upload URLs, perhaps a minor one.

When uploading files with GAE, you need to use an unique, server-side generated URL for each single file. Therefore the URL needs to be changed before each submission. At present there seems to be no "rightful" way to do it. One can modify the "_opts" member object on the fly (that's how i do it) but i assume it's supposed to be private (?). A possible problem with this workaround is that it may break the behavior for iframe-dependent browsers. Although, after a quick look at the code, i don't think it does.

@LPology
Copy link
Owner

LPology commented Mar 14, 2014

Just pushed an update to the plugin. Newest version has a new method called setOptions() that allows uploader options to be set or changed. It accepts an object.

So, if you wanted to change the URL of the upload after the user clicks submit, you could do it like this:

onSubmit: function() {
    this.setOptions( { url: '/dir/newUrl' } );
}

@LPology LPology closed this as completed Mar 14, 2014
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