Upload to SitePages library on Classic Team Site with Modern Experience

Frequent Contributor

We have been using simple ".aspx" files to show custom pages (things which can't be created with SPO) on select sites in our classic environment. For example, web exports from Visio are hosted in SitePages on one of our classic team site.


I know that ".aspx" files can be uploaded to SharePoint Online, but they won't work unless the site allows to run custom script. By default, custom script is blocked on user-created sites that have Office 365 groups. I understand that O365-Group-connected team sites won't allow ".aspx" files. Now that is an other gripe for another day.


But, I have a classic team site, and when I choose to use the modern experience, then the SitePages library won't show the "Upload" option in the UI at all.


However, using the classic experience, there is that regular old upload available and functional. 


Why so?


Upload on SitePages in classic experienceUpload on SitePages in classic experienceUpload missing on SitePages from modern experienceUpload missing on SitePages from modern experience

Why should this be? Perhaps there is a common UI pattern irrespective of whether it is on a classic site or a group-connected modern site. But, this should check and honour the type of site, permissions, and whether custom scripting is enabled; based on which "upload" button should be enabled/disabled.



3 Replies

Pinging @Mark Kashman for visibility, because I don't know who would be right people to ping on this. 

Sorry Mark, that is the price you pay for being a known name --> so that unknown names can flood your inbox with pings ;)

Not a problem to ping me with questions. Part of the job, and only slow to reply sometimes as I balance it with other to dos ;). I think you are seeing the move away from classic development patterns and practices. You can allocate server resources to classic team sites from the SPO admin center, but it is something we are moving away from with modern sites in that the SharePoint Framework is the new model we're establishing for modern dev on all modern sites.

And the new pages library is meant to be wired to the New > Page menu that would steer people away from uploading a classic .aspx page. So it's not unexpected what you see, though it does feel inconsistent when you switch between the two.

Hope that helps understand a little more,

@Mark Kashman so this isn't a solution in as much as it is a "sorry ol chap, we turned it off, have you considered not wanting the thing you want?".