-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upload image on shopify store #55
Comments
@Anshu-Shar i'm not sure I understand what the issue is i'm assuming you're uploading an image from your application to shopify's CMS? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello @Mini-Sylar
I need to upload the image on shopify store after deploy it on AWS but getting the below error.so please help me out on this.
storefrontController.ProductFileUpload = async (req, res) => {
try {
const shop = req.body.store;
const fileData = req.body.file;
} catch (error) {
console.error('Error uploading or retrieving file from Shopify:', error);
return res.status(500).json({ error: 'Error uploading or retrieving file from Shopify' });
}
};
Getting the error as below:-
20:33:01 │ web-backend │ Shopify GraphQL Upload Response: {
20:33:01 │ web-backend │ "data": {
20:33:01 │ web-backend │ "fileCreate": {
20:33:01 │ web-backend │ "files": [
20:33:01 │ web-backend │ {
20:33:01 │ web-backend │ "id": "gid://shopify/MediaImage/39028884635967",
20:33:01 │ web-backend │ "alt": "upload file",
20:33:01 │ web-backend │ "createdAt": "2024-09-05T15:03:01Z"
20:33:01 │ web-backend │ }
20:33:01 │ web-backend │ ],
20:33:01 │ web-backend │ "userErrors": []
20:33:01 │ web-backend │ }
20:33:01 │ web-backend │ },
20:33:01 │ web-backend │ "extensions": {
20:33:01 │ web-backend │ "cost": {
20:33:01 │ web-backend │ "requestedQueryCost": 20,
20:33:01 │ web-backend │ "actualQueryCost": 20,
20:33:01 │ web-backend │ "throttleStatus": {
20:33:01 │ web-backend │ "maximumAvailable": 2000,
20:33:01 │ web-backend │ "currentlyAvailable": 1980,
20:33:01 │ web-backend │ "restoreRate": 100
20:33:01 │ web-backend │ }
20:33:01 │ web-backend │ }
20:33:01 │ web-backend │ }
20:33:01 │ web-backend │ }
20:33:02 │ web-backend │ Shopify File Details Response: {
20:33:02 │ web-backend │ "errors": [
20:33:02 │ web-backend │ {
20:33:02 │ web-backend │ "message": "Field 'file' doesn't exist on type 'QueryRoot'",
20:33:02 │ web-backend │ "locations": [
20:33:02 │ web-backend │ {
20:33:02 │ web-backend │ "line": 3,
20:33:02 │ web-backend │ "column": 9
20:33:02 │ web-backend │ }
20:33:02 │ web-backend │ ],
20:33:02 │ web-backend │ "path": [
20:33:02 │ web-backend │ "query getFileDetails",
20:33:02 │ web-backend │ "file"
20:33:02 │ web-backend │ ],
20:33:02 │ web-backend │ "extensions": {
20:33:02 │ web-backend │ "code": "undefinedField",
20:33:02 │ web-backend │ "typeName": "QueryRoot",
20:33:02 │ web-backend │ "fieldName": "file"
20:33:02 │ web-backend │ }
20:33:02 │ web-backend │ },
20:33:02 │ web-backend │ {
20:33:02 │ web-backend │ "message": "Variable $id is declared by getFileDetails but not used",
20:33:02 │ web-backend │ "locations": [
20:33:02 │ web-backend │ {
20:33:02 │ web-backend │ "line": 2,
20:33:02 │ web-backend │ "column": 7
20:33:02 │ web-backend │ }
20:33:02 │ web-backend │ ],
20:33:02 │ web-backend │ "path": [
20:33:02 │ web-backend │ "query getFileDetails"
20:33:02 │ web-backend │ ],
20:33:02 │ web-backend │ "extensions": {
20:33:02 │ web-backend │ "code": "variableNotUsed",
20:33:02 │ web-backend │ "variableName": "id"
20:33:02 │ web-backend │ }
20:33:02 │ web-backend │ }
20:33:02 │ web-backend │ ]
20:33:02 │ web-backend │ }
The text was updated successfully, but these errors were encountered: