You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
❌ Please edit your post and use the provided template when creating a new issue. This helps everyone to understand your post better and asks for essential information to quicker review the issue.
If it’s consistently enableForPublic in this repo, then there’s no point in my opinion to change it (as it would be a breaking change for configurations that are already using the correct option.
I think updating the documentation is the easiest approach. What do you think?
I see that now in the changelog. This is my mistake, most of my projects specify the latest version but for some reason, this one had the full repo URL instead of a version so it grabbed master. I was thinking this was version 4.10.4 but you are correct, this project was on master by mistake. Might have been filled in "helpfully" by WebStorm or something.
Well, we should probably leave this issue open for the time being because the bug still exists - just not in production. Given it hasn't been released yet, probably easiest just to update the Router to match the spec/doc/etc. I can send in this PR if that sounds like a plan.
Well, we should probably leave this issue open for the time being because the bug still exists
Could you point me to where in the project/documentation the "enabledForPublic" code is? I can only find it in outdated PRs that weren't merged, such as this comment and #6997.
The merged spec seems to consistently use enableForPublic.
Yes you're right, I was looking at the outdated PR #6997 and grabbed the options from there. I thought it was weird that I couldn't find good documentation elsewhere, I guess it's been a long week...
Activity
parse-github-assistant commentedon Oct 2, 2021
Thanks for opening this issue!
dblythy commentedon Oct 2, 2021
Nice catch! Would you be willing to submit a PR?
Vortec4800 commentedon Oct 2, 2021
Sure thing... Just need to know which one is correct 😁
dblythy commentedon Oct 2, 2021
If it’s consistently
enableForPublicin this repo, then there’s no point in my opinion to change it (as it would be a breaking change for configurations that are already using the correct option.I think updating the documentation is the easiest approach. What do you think?
dblythy commentedon Oct 2, 2021
Could you point to the documentation that is outdated?
The
fileUploadfeature is an unreleased feature, not available on4.10.4. It will be available on V5, or, is currently available on the master branch.https://github.com/parse-community/parse-server/blob/master/CHANGELOG.md
Vortec4800 commentedon Oct 2, 2021
I see that now in the changelog. This is my mistake, most of my projects specify the latest version but for some reason, this one had the full repo URL instead of a version so it grabbed master. I was thinking this was version 4.10.4 but you are correct, this project was on master by mistake. Might have been filled in "helpfully" by WebStorm or something.
Well, we should probably leave this issue open for the time being because the bug still exists - just not in production. Given it hasn't been released yet, probably easiest just to update the Router to match the spec/doc/etc. I can send in this PR if that sounds like a plan.
dblythy commentedon Oct 2, 2021
Could you point me to where in the project/documentation the "
enabledForPublic" code is? I can only find it in outdated PRs that weren't merged, such as this comment and #6997.The merged spec seems to consistently use
enableForPublic.Vortec4800 commentedon Oct 2, 2021
Yes you're right, I was looking at the outdated PR #6997 and grabbed the options from there. I thought it was weird that I couldn't find good documentation elsewhere, I guess it's been a long week...
dblythy commentedon Oct 2, 2021
No worries at all! We'll add the full
fileUploaddocumentation to the docs once V5 is released.Vortec4800 commentedon Oct 2, 2021
Makes sense. Thank you!