Skip to content

Error: upload.arrayBuffer is not a function #8497

Closed
@VKlapan

Description

@VKlapan

New Issue Checklist

Issue Description

When I try to upload a file (via Parse Dashboard GraphQL API Console) I receive an error:
"upload.arrayBuffer is not a function".
Do not understand - what is wrong?

Steps to reproduce

Try to check file uploading via Parse Dashboard GraphQL API Console.
Query:
mutation createFile($file: Upload!) { createFile(input: {upload:$file}) { fileInfo { name url } } }
Variables - base64 string:
{ "file":"V29ya2luZyBhdCBQYXJzZSBpcyBncmVhdCE=" }

Actual Outcome

Response:
{ "errors": [ { "message": "upload.arrayBuffer is not a function", "locations": [ { "line": 2, "column": 3 } ], "path": [ "createFile" ] } ], "data": { "createFile": null } }

Expected Outcome

Environment

Server

  • Parse Server version: 6.0.0
  • Operating system: Linux Mint 20.2 Cinnamon and docker
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): local

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: mongo:4
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): local

Client

  • SDK (iOS, Android, JavaScript, PHP, Unity, etc): JavaScript
  • SDK version: "@types/parse": "^2.18.13"

Logs

server config:

`
Successfully compiled 1 file with Babel (297ms).
SERVER CONFIG
Configuration loaded from /parse-server/config/server.js
warn: DeprecationWarning: The Parse Server option 'allowClientClassCreation' default will change to 'false' in a future version.
warn: DeprecationWarning: The Parse Server option 'allowExpiredAuthDataToken' default will change to 'false' in a future version.
RUN Parse Server Cloud
allowClientClassCreation: true
allowCustomObjectId: false
allowExpiredAuthDataToken: true
allowHeaders: ["X-Apollo-Tracing"]
appId: parse-template
appName: Parse Template
cacheMaxSize: 10000
cacheTTL: 5000
cloud: /parse-server/cloud-dist
collectionPrefix:
customPages: {"invalidLink":"http://localhost/invalid-link","invalidVerificationLink":"http://localhost/invalid-verification-link","passwordResetSuccess":"http://localhost/password-reset-success","choosePassword":"http://localhost/choose-password"}
databaseURI: mongodb://db/parse
defaultLimit: 100
directAccess: true
emailAdapter: {"options":{"service":"SMTP","fromAddress":"dev@.com","user":"dev@","password":"","host":"mail..com","port":587,"isSSL":false,"templates":{"resetPassword":{"path":"/parse-server/templates/reset-password","subject":"Password reset"},"verifyEmail":{"path":"/parse-server/templates/verify-email","subject":"Email verification"}}}}
emailVerifyTokenReuseIfValid: false
emailVerifyTokenValidityDuration: 7200
enableAnonymousUsers: true
enableExpressErrorHandler: false
enforcePrivateUsers: true
expireInactiveSessions: true
filesAdapter: {"_encryptionKey":null,"_filesDir":"/parse-server/files"}
fileUpload: {"enableForPublic":true,"enableForAnonymousUser":true,"enableForAuthenticatedUser":true}
graphQLPath: /graphql
graphQLSchema: /parse-server/schema.graphql
host: 0.0.0.0
idempotencyOptions: {"ttl":300,"paths":[]}
liveQuery: {"classNames":[]}
logLevel: warn
logLevels: {"triggerAfter":"info","triggerBeforeError":"error","triggerBeforeSuccess":"info"}
logsFolder: ./logs
maintenanceKeyIps: ["127.0.0.1","::1"]
masterKey: REDACTED
masterKeyIps: ["172.30.0.0/16"]
maxUploadSize: 4000mb
mountGraphQL: true
mountPath: /
mountPlayground: false
objectIdSize: 10
pages: {"enableRouter":false,"enableLocalization":false,"localizationFallbackLocale":"en","placeholders":{},"forceRedirect":false,"pagesPath":"./public","pagesEndpoint":"apps","customUrls":{},"customRoutes":[]}
passwordPolicy: {"doNotAllowUsername":true,"resetTokenValidityDuration":10800}
playgroundPath: /playground
port: 1337
preserveFileName: false
preventLoginWithUnverifiedEmail: false
protectedFields: {"_User":{"
":["email"],"role:admin":[]}}
publicServerURL: http://localhost:1337
rateLimit: []
requestKeywordDenylist: [{"key":"_bsontype","value":"Code"},{"key":"constructor"},{"key":"proto"}]
restAPIKey: asd78sd897df09as87dfh09asd
revokeSessionOnPasswordReset: true
scheduledPush: false
security: {"enableCheck":false,"enableCheckLog":false}
sessionLength: 31536000
startLiveQueryServer: true
trustProxy: []
verbose: false
verifyUserEmails: true
jsonLogs: false
level: undefined
serverURL: http://localhost:1337/
state: initialized

`

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions