I have a SPFx solution which have a input tag to upload a file. When I try to upload the file in the same context of the site collection it works fine, but I am not able to get uploaded to different site collection.
Example: <input type=file"/> is used to upload the file in https://sharepoint.com/sites/test1. When I try to upload using sp.web.getFolderByServerRelativeUrl it works fine within same site collection & file uploaded successfully. But I need to upload the file to https://sharepoint.com/sites/test2. Can anyone please help me with this cross site collection file upload issue?