Opening a file on a mounted AFP volume from Sandboxed Safari Web Extension

Hi, is it possible to open a file (in its corresponding application) from Safari Web App.

Let's say we have a mounted afp volume /Volumes/test

The code is as follows:

class SafariWebExtensionHandler: NSObject, NSExtensionRequestHandling {

	func beginRequest(with context: NSExtensionContext) {
        NSWorkspace.shared.open(URL(fileURLWithPath: "/Volumes/test/image.jpg"))
   }

}

Right now I get the following exception:

The application “(null)” does not have permission to open “image.jpg.”

I wonder if it is even possible to open a file from Safari Web Extension like this.

I managed to do it for Chrome Extension though

Thanks

Opening a file on a mounted AFP volume from Sandboxed Safari Web Extension
 
 
Q