'Metadata part too large' error for bulk mutation file

I am trying to upload a file for running a bulk mutation. My full file is only 8.8 Mb but i get a 400 response with the aforementioned error when attempting to upload the file. If i limit the size of the file to around ~2MB it works. the documented max size is 20MB so why am I getting this response? each line is only a couple KB so it is not the 1MB line issue

1 Like

Hey @Ryan_Tullis
Where exactly are you seeing the error? I don’t see metadata part too large as one of the listed codes: BulkMutationErrorCode - GraphQL Admin

Unless this is happening with the stagedUploadsCreate - GraphQL Admin mutation. If so, can you share more details about the mutation you’re sending. If possible, the x-request-id from the response headers can help us locate this in our logs.

This is after running the stagedUploadCreate mutation. I get a successful response with the params and URL and make a post request with a multipart form to upload the file. So I guess It’s not technically through the shopify API but through it’s infrastructure.

a follow up question. The StagedUploadInput has a fileSize field that is required when the request’s resource property is set to [VIDEO] or [MODEL_3D] but is not mentioned in the Bulk mutation docs. Is this required / is there any reason to provide it?

You should only need the parameters outlined here: Bulk import data with the GraphQL Admin API

Can you share an example of the POST request you are sending (redact the specific keys though) to get an idea of the structure?

Hey! Are you still experiencing this issue, or can I mark this as solved?