I'm glad to hear you found the answer for the issue, if you have any other issue about SharePoint, you are welcome to raise a ticket in this forum.
By the way, since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others.". So, I would make a brief summary of this thread:
You could click the "Accept Answer" button for this summary to close this thread, and this can make it easier for other community members to see the useful information when reading this thread. Thanks for your understanding!
[SharePoint Api uploads file from postman with 201 response but not visible in Library]
Issue Symptom:
OP is a SharePoint admin can see everything on the site.
When trying to upload a file using Api to SharePoint, file name is "Test1" and it is an txt file, once uploaded it does not show on the library.
OP tried to upload the exact file again or different csv file, OP can see the SharePoint folder item counts increases but file is hidden.
curl --location --request PUT 'https://graph.microsoft.com/v1.0/drives/{{DriveID}}/items/root:/folder_path/Test1.txt:/content' \ --header 'Authorization: Bearer {{access_token}}' \ --header 'Content-Type: text/plain' \ --data-binary '@/C:/Users/OneDrive/Downloads/IDEA.docx'
Current status:
OP got the solution from the answers posted here: https://learn.microsoft.com/en-us/answers/questions/1350545/i-cannot-view-see-my-files-which-i-have-uploaded-t
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.