Unable to use mutation stagedUploadsCreate together with resourcetype VIDEO on Google Cloud

Topic summary

Issue Identified and Resolved

The developer encountered a problem with the stagedUploadsCreate mutation when using resourceType: VIDEO on Google Cloud infrastructure. The mutation returned empty url and resourceUrl parameters for videos, while working correctly for FILE and IMAGE types.

Key Details:

  • Previously uploaded 10,000 images and 1,000 videos successfully using the same code on AWS
  • Problem only occurs with VIDEO resource type after Shopify switched to Google Cloud
  • No error messages were initially provided by the API
  • Even using official Shopify documentation examples failed for VIDEO uploads

Root Cause:

The issue was not a technical bug but a plan limitation. When manually uploading through the backend, a clear error message revealed:

  • The store’s plan has a maximum limit of 1,000 videos and 3D models combined
  • This limit had already been exceeded
  • Solution: Upgrade the plan to add more videos

Criticism: The developer noted that Shopify’s API error messages are inadequate, as the GraphQL mutation provided no indication of the plan limitation issue.

Summarized with AI on November 7. AI used: claude-sonnet-4-5-20250929.

I have a problem with just the mutation stagedUploadsCreate($input: [StagedUploadInput!]!), which is the first step of uploading. It should provide a url and resourceUrl.

I have uploaded 10.000 images and 1000 videos via graphql mutations with the same code before.
Also tried several approaches and debug outputs and it all points to the following issue:

From time to time Shopify changes from AWS to Google Cloud and when that happens somehow I cannot get the stagedUploadsCreate to provide me the required data.

With Google Cloud and only when I try a resourcetype VIDEO, the parameters come back empty.

Works with resourcetype: FILE

Request ID: bc8f992c-85f3-4cd6-9847-b719a185f5c6-1720650841

Does not work with resourcetype: VIDEO

Request ID: 5d5d3ebc-d4ca-40d2-acf9-a1e470841efd-1720651119

Code Snippet used both times:

$filename = "__test234.mp4"; // Assume this is the file you want to upload
$filenamepath = "/path/".$filename;
$mimeType = mime_content_type($filenamepath);
$resourcetype = "VIDEO";
$fileSize = filesize($filenamepath);

$graphql_query = <<

What I send is the same in both instances, except resource

```css
(
[filename] => __test234
[mimeType] => video/mp4
[httpMethod] => POST
[resource] => VIDEO
[fileSize] => 4240733 
)

But I get it back empty:

Array
(
 [url] =>
    [resourceUrl] =>
    [parameters] => Array
)

Still need a hand here.
Let me reiterate so it becomes clear.

My solution worked in AWS.
My solution works with FILE and IMAGE type.
But with VIDEO type I do not get an output.

Even when I use the official code and variables from here:
https://shopify.dev/docs/api/admin-graphql/2024-07/mutations/stageduploadscreate

These input variables:

{
  "input": [
    {
      "filename": "image1.png",
      "mimeType": "image/png",
      "httpMethod": "POST",
      "resource": "IMAGE"
    },
    {
      "filename": "video.mp4",
      "mimeType": "video/mp4",
      "fileSize": "1234",
      "resource": "VIDEO"
    },
    {
      "filename": "3d_model.glb",
      "mimeType": "model/gltf-binary",
      "resource": "MODEL_3D",
      "fileSize": "456"
    }
  ]
}

give me resourceUrls only for IMAGE and FILE.
Video comes back empty since shopify changed to Google Cloud.

There is not upload done at all at this stage.
This is just to retrieve the staging URL.

Permissions to write and read files is of course given to my app.

No error message. Eg. when I put a huge filesize for VIDEO I do get an error message.
What could be the reason?

Shopify API error messages are not up to the task!
When manually uploading in backend I have now a usable error message that is the reason for the problem.

Error with files
Your plan allows you a maximum of 1000 videos and 3D models. Upgrade your plan to add more.

So this has nothing to do with Shopify now using Google Cloud for videos, but the number of allowed videos have been exceeded for this plan.