Reputation: 491
Can you add a custom button to extend the functionality of the uploader. what I need is the ability to allow the user to enter text into a form after an image has been uploaded.
Is there any documentation on this? the goal is to add an additional button that can get the image UUID and open an text area to enter text to post back to the servers. thank you.
Upvotes: 1
Views: 58
Reputation: 2041
What I need is the ability to allow the user to enter text into a form after an image has been uploaded.
The only way for the client to know if an image has been "successfully" uploaded is if the server returns the correct response and the onComplete
event is called. Inside of this handler you can run any arbitrary code you would like including getting the UUID of a successfully uploaded item:
// ...
onComplete: function(id, name, json, xhr) {
var uuid = this.getUuid(id);
// or if using jQuery
// var uuid = $(this).fineUploader('getUuid', id);
if (json.success === true) {
// then you will render your text area, and then intercept its form submit to
// send the POST request data to the server. Left as an exercise to the user.
}
}
// ...
Upvotes: 1