I have used the graphql API for upload pdf in shopify Settings->Files sections. But i didn’t get success if anyone have any suggestion regarding this please let us know.
i have used this code
I took a look at what you shared, and it appears you are may have run into a few issues in the file staging process for creating a new file asset in the admin. Here is our stagedUploadsCreate mutation doc that provides a good starting point of the mutation body and variable structure.
I suggest testing and debugging with an API client (like Insomnia), as this process requires multiple stages and requests to complete. Here is an example of a mutation I tested that successfully returned a staging url and details:
If you aren’t familiar with this type of workflow I’d suggest taking a look at our product media upload API examples for insights on a similar process. The data returned from the initial mutation will need to be formatted as multipart form data then uploaded through an HTTP request (examples provided in cURL).
Once a file is staged, you can use the url and fileCreate mutation to create a new file asset.
Hope that offers a good starting point for you - Cheers!