How do you return the URL of a file after it has been uploaded to a document library, using the default upload page? Returning the text from the "inputFile" textbox from the upload.aspx page would also work, but I can't figure out how to do that because it's loaded inside a modal dialog.
function uploadPicture(){
var currentUserDispName ='myname';
var options = {
url: '/test/_layouts/15/Upload.aspx?List=6c7bc1b3%2D1b7f%2D466b%2Da0f5%2Dac15dc334ff7& RootFolder=/test/mydocs/' + currentUserDispName + "&IsDlg=1",
width: 450,
height: 230,
title: 'Upload a Picture',
dialogReturnValueCallback: function(result, returnValue) {
if (result == SP.UI.DialogResult.OK) {
//get File URL
}
else {
//else
}
}; SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);}