问题
I am trying to pass an additional parameter to an instance of Fine Uploader via
.on('upload', function(event, id, name) {
var artistId = $('#PhotoArtists').val();
$(this).fineUploader('setParams', {artist: artistId}, id);
})
with the intention of saving the filename, artist, etc to database in the specified uploadSuccess endpoint. But I don't think my params are being passed that far in any shape or form. (I assume they're available in the file I've specified for signature.endpoint.)
Is there a documented way of persisting these params all the way to the end of the process for saving? Or is there a better plan of action for saving all relevant details to the database at a different point?
回答1:
If you want to pass parameters to your upload success endpoint, you'll need to either set the uploadSuccess.params option and/or use the setUploadSuccessParams API method.
来源:https://stackoverflow.com/questions/22179298/pass-additional-fine-uploader-params-all-the-way-to-the-uploadsuccess-endpoint