I have a document library that contains one level of folders. Each folder will contain multiple files, with a metadata column containing the name of the folder. I have set up a new view with just the file name (with link to document) and Title, and then created a List View web part for this libary. I've added a filter to only show the contents (in a flat view without folders) where the metadata column matches the querystring parameter. This structure is necessary to allow differentiated access at the folder level.
I was able to create a link in the web part to use upload.aspx in the doclib/forms folder to create a new folder, and another link to upload a document. The create folder link works fine. But after creating a folder, when I use the add document link the new folder doesn't show in the selection tree. Refreshing doesn't help, nor does navigating away and then back. If I close IE and reopen it, it shows up fine. My links are using javascript to open a modal dialog box with a callback to refresh the page.
function CreateRestrictedFolder() {
var MOCNum = decodeURIComponent(getQuerystring('MOCNumber'));
var sURL = "/Restricted%20Attachments/Forms/Upload.aspx?RootFolder=%2FRestricted%20Attachments&Type=1&IsDlg=1&MOCNumber=" + MOCNum;
OpenPopUpPage(sURL,RefreshOnDialogClose, 800, 400);
}
function AddRestrictedDocument() {
var MOCNum = decodeURIComponent(getQuerystring('MOCNumber'));
var sURL = "/_layouts/Upload.aspx?List={C4AA8A21-54FE-42D8-AD00-73CAC1CC7533}&MOCNumber=" + MOCNum;
OpenPopUpPage(sURL,RefreshOnDialogClose, 800, 400);
}
I have another library without folders for unrestricted documents, and I was able to pass the querystring parameter into a custom editform.aspx file and show the metadata column prepopulated and read-only. But I can't seem to do the same kind of thing with Upload.aspx (can't add the custom form content like you can with editform or dispform).
Any ideas on how I can prepopulate the 'folder name' field in the forms from the querystring?
thanks