Mar 26 2018 09:53 AM
I am no longer able to upload files with the Document Library Preview web part. Anyone else having this issue. I know it's in preview but if I can't upload can I at least hide the upload button?
Mar 27 2018 02:07 PM
Yes, I have this issue too. Even for something in preview, not being able to upload to a document library is pretty basic. Does Microsoft want us to use this new experience?!
Mar 28 2018 07:59 AM
I ended up creating an Application Customizers extension. Use the code below on the public OnInit method to inject CSS to change the link color and hide the upload toolbar. I needed the link color white on my dark theme.
@override
public onInit(): Promise<void> {
// Log.info(LOG_SOURCE, `Initialized ${strings.Title}`);
// let message: string = this.properties.testMessage;
// if (!message) {
// message = '(No properties were provided.)';
// }
// Dialog.alert(`Hello from ${strings.Title}:\n\n${message}`);
(() => {
/** hack styles for the document library preview links and hide upload toolbar */
const style1 = document.createElement('style');
style1.innerText = `
.detailsListCellName a.ms-Link {
color: #fff;
}
.ms-CommandBar {
display:none;
}
`;
style1.setAttribute('target', 'pagination');
document.head.appendChild(style1);
})();
return Promise.resolve();
}
Mar 29 2018 09:20 AM
Updated code to work in IE and Chrome
Apr 04 2018 07:49 AM
Also having this issue, but we need the upload feature, we don't want to hide it. MS Article says the web part can upload files, is this a function available to "Targeted Release" only or is it a settings thing?
Hoping someone from MS can help answer?
Apr 11 2018 11:54 AM
Seeing the same, indeed was about to post. What you can do is select the Document Library in the navigation and upload there, for now.
Sep 12 2018 12:53 AM
Upload works fine for me.
Although the Replace existing file function does not.
Error:
Supposedly fixed when web part is GA.
Or users need to goto Library and upload for Replace to work.