Skip to content

Typo in new FileUpload options #7602

Closed
Closed
@Vortec4800

Description

@Vortec4800

This issue is for the latest release of Parse Server, 4.10.4, regarding #7071.

In all the documentation everywhere, and in the sample config, the new options are listed as:

fileUpload: {
  enabled: true, // Is true if files can be uploaded with Parse Server. Default is true.
  enabledForAnonymousUser: false, // Is true if file upload is enabled for Anonymous Users. Default is false.
  enabledForPublic: false // If true if file upload is enabled for anyone with access to the Parse Server file upload endpoint, regardless of user authentication. Default is false.
}

I set these keys in my config but still couldn't get it to work. Finally after digging for a while, I realized in the actual FilesRouter.js where the config options are checked, it's listed as:

if (!isMaster && !config.fileUpload.enableForPublic && !user) {
  next(new _node.default.Error(_node.default.Error.FILE_SAVE_ERROR, 'File upload by public is disabled.'));
  return;
}

Note this shows enableForPublic instead of enabledForPublic as above.

I don't know if this is a documentation bug or a bug in the Router, but I wanted to highlight this in case someone else was trying to get it working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:docsOnly change in the docs or README

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions