SharePoint Online - .url Files Don't Open in Browser

%3CLINGO-SUB%20id%3D%22lingo-sub-1122991%22%20slang%3D%22en-US%22%3ESharePoint%20Online%20-%20.url%20Files%20Don't%20Open%20in%20Browser%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1122991%22%20slang%3D%22en-US%22%3E%3CP%3EI%20made%20a%20custom%20SPFX%20command%20set%20extension%20that%20can%20be%20used%20for%20making%20links%20to%20files.%20The%20extension%20creates%20a%20.url%20file%20which%20opens%20in%20the%20browser.%20Here%20is%20an%20example%20of%20one%20of%20the%20files%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%5BInternetShortcut%5D%3CBR%20%2F%3EURL%3D%3CA%20href%3D%22https%3A%2F%2Fbluemetal.sharepoint.com%2Fsites%2FstephendevShared%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fbluemetal.sharepoint.com%2Fsites%2FstephendevShared%3C%2FA%3E%20Documents%2FProjectName1%2FAgreements%2Fmeeting-notes10-10-10.docx%3Fweb%3D1%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20works%20perfectly%20in%20my%20dev%20environment%2C%20but%20in%20the%20production%20environment%20the%20.url%20files%20fail%20to%20open%2C%20they%20just%20get%20downloaded%20instead.%20I%20have%20also%20noticed%20that%20if%20I%20download%20the%20file%20and%20reupload%20them%2C%20they%20open%20fine%20in%20the%20browser.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20no%20idea%20why%20this%20is%20happening%20and%20would%20appreciate%20any%20help.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1122991%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDocument%20Library%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFiles%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1828422%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Online%20-%20.url%20Files%20Don't%20Open%20in%20Browser%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1828422%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20the%20same%20issue%2C%20no%20idea%20whats%20causing%20it%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I made a custom SPFX command set extension that can be used for making links to files. The extension creates a .url file which opens in the browser. Here is an example of one of the files:

 

[InternetShortcut]
URL=https://bluemetal.sharepoint.com/sites/stephendevShared Documents/ProjectName1/Agreements/meeting-notes10-10-10.docx?web=1

 

 

It works perfectly in my dev environment, but in the production environment the .url files fail to open, they just get downloaded instead. I have also noticed that if I download the file and reupload them, they open fine in the browser.

 

I have no idea why this is happening and would appreciate any help.

1 Reply
Highlighted

I have the same issue, no idea whats causing it