-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Unable to upload file via File field #480
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
Comments
Small update: I tried to remove all the client keys and upload worked! But I still need those keys to enforce some sort of security. Even removing one of them is not an option, otherwise they are not enforced (#1789). So I'm guessing it's a bug with Parse Dashboard |
I'm seeing the same issue. Running Parse-Dashboard 1.0.15 on heroku. Also tried running locally with no luck. Neither worked. I only have my appId and masterKeys set. |
@jgaull the difference being that yours in unable to upload anything at all using just appId and master key. I can do that, but defining other keys breaks everything :) What response are you getting in the console when trying to upload? |
@staticdreams Same error as you: |
+1 Failed to load resource: the server responded with a status of 403 (Forbidden) |
How big is the file? I had a similar problem for files >1mb. Check out this link and see if it applies: |
@Rioner123 not big. like 200-400k. I ended up removing client keys, but it presented another issue: Anyone, knowing your parse path is able to upload junk files to your server at will: #2484 |
@Rioner123 This is happening to me to every file size. |
I got my file upload working by putting the javascriptKey in the Parse configurations settings.
|
ok @cleever you made my day |
I got no error message at all. But the file is not uploaded. I know the reason already. The file name can't be UTF8, must be ascii because the dashboard is trying to encode the UTF8 so that it of course can't be found.Otherwise I'll see 404 error in browser console. |
@zh-wowtv you need to make sure that file name don't have special characters or accents like "àóéçã()" to work properly. |
Unfortunately @cleever's solution didn't work for me. However, testing tonight I noticed that I'm getting an error on the parse-server side:
Is anybody else seeing this? Should I report this issue in parse-server? -EDIT- A Google search lead me to #375. It had the solution. I changed my express version in my package.json to |
@jgaull create to hear that! |
Hello, I have read this thread and changed my express version, as suggested by @jgaull to ~4.11.x. It still doesn't work :S My package.json dependencies looks like this (omitting several packages): {
"dependencies": {
"body-parser": "^1.15.2",
"express": "^4.11.2",
"parse": "^1.9.1",
"parse-dashboard": "^1.0.21",
"parse-server": "^2.2.25",
"parse-server-mailgun": "^2.1.7",
"parse-server-onesignal-push-adapter": "^1.0.0",
"parse-server-push-adapter": "^1.0.4",
"parse-server-simple-mailgun-adapter": "^1.0.0",
}
} As you can see, I have the most recent version of parse-server and parse-dashboard, as well as the suggested express version. I have set all the client keys for the parse-server. I made a simple script to upload a file and it worked, so I know there's no problem with my AWS configuration. But, when I try to upload a File from the Parse Dashboard on Chrome I get an error:
So, I tried to upload the same image from Firefox, and I get:
Please help me |
I think this should be documented. Without |
@andrew8712 The parse config doesn't work either |
I can't upload files with size larger than 1mb in Dashboard with S3 adapter. Environment Setup: |
Please try this... i suspect this is your problem too |
The issue is not in relation to filesize issues. It is because you're setting a ClientKey without setting a JavascriptKey. Add the JavascriptKey to both your dashboard and server config files and you'll find that it works again. |
Finally got this working by adding the javascriptKey to the dashboard's configuration |
Adding the javascript key fixed this issue for me too. |
Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Dashboard!
Environment Setup
Latest (as of now) Parse Server 2.2.17 running on OpenShift
Latest version of Parse Dashboard 1.0.15 (launched with params on my machine)
Steps to reproduce
I'm able to connect and modify any data in mongoDB, but File fiels does not work. It upon uploading it return
{"error":"unauthorized"}
I have specified every single key parse config (master, client, javascript, dotnet, file and rest)
At first I thought it was a parse-server issue, so I tried uploading using curl:
curl -X POST -H "X-Parse-Application-Id: myAppId" -H "X-Parse-REST-API-Key: restKeyHere" -H "Content-Type: text/plain" -T "hello.txt" https://www.myserver.com/parse/files/hello.txt
This worked as expected. So the problem must be with dashboard?
Logs/Trace
Note: If you get a browser JS error please run
npm run dev
. This will provide source maps and a much more useful stack trace.The text was updated successfully, but these errors were encountered: