I don't think this is possible via Rest API or Graph API. We have different api for create folder and upload files. The request body are different too.
When you create a folder in sharepoint via Graph, you will need to use following api and request body
POST /sites/{site-id}/drive/items/{parent-item-id}/children
{
"name": "New Folder",
"folder": { },
"@microsoft.graph.conflictBehavior": "rename"
}
When you upload a file by Graph, you can use following api
PUT /sites/{site-id}/drive/items/{parent-id}:/{filename}:/content
Here is the document for reference
Create a new folder in a drive
Upload or replace the contents of a DriveItem
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.