Tooba Atif
Posts: 0
Joined: Fri Apr 04, 2014 3:07 am

Upload File Bad Request Error

Hi,

I have followed this tutorial

http://docs.appery.io/tutorials/uploa...

and on png image file upload it gives me error alert and navigate to page as well. Both error and Success are working and file is also uploaded.
This is what I have implemented:
On service error : alert("Bad Request");
On service success : navigate to page xyz

Why it shows the alert "Bad request" if file is uploaded after that. What I am doing wrong?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Upload File Bad Request Error

Hi Tooba,

Please post a screenshot of Network browser tab.

Tooba Atif
Posts: 0
Joined: Fri Apr 04, 2014 3:07 am

Upload File Bad Request Error

Hi Katya,

Here is the screenshot..
Image

Here is the code in Data tab.

Image

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Upload File Bad Request Error

Hi Tooba.

We have checked this tutorial and it's ok.

So probably you just missed some steps.

Maybe login processing, or mapping sessionToken to the request in filesUploaser service.

So please give us screen shot from NETWORK browser debuger tab. We want to see request parameters and response.

See example:

Request: http://prntscr.com/3f26jq/direct

Response: http://prntscr.com/3f26v1/direct

Regards.

Tooba Atif
Posts: 0
Joined: Fri Apr 04, 2014 3:07 am

Upload File Bad Request Error

Yurii,
Thanks for your help.
I figured this out its the issue with local token variable and JS validation.
Solved it.
Thanks a lot.

R2R
Posts: 0
Joined: Wed May 07, 2014 7:24 pm

Upload File Bad Request Error

I also followed the tutorial to upload file to a database. This function works perfectly for me on PC/Mac browser but it does not work on my iPhone, iOS7. The error I receive is:

Error: Bad request

Is there anything different that has to be done for mobile Safari and other mobile browsers? I've checked the link for File API browser compatibility and mobile Safari 6.1, 7.1, and 8 are compatible.

Thanks!

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Upload File Bad Request Error

Hello,

Could you please share your project with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a and tell us its name? http://docs.appery.io/documentation/s...

R2R
Posts: 0
Joined: Wed May 07, 2014 7:24 pm

Upload File Bad Request Error

Hello Evgene,

I've shared the "Life Sciences Video Zone" app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a. Thank you for your help.

Artur

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Upload File Bad Request Error

Hello Artur,

Sorry for delay. Could you please download this file (https://www.dropbox.com/s/byk3e4997fk...) and replace standard file in Source tab with this one? This should help.

R2R
Posts: 0
Joined: Wed May 07, 2014 7:24 pm

Upload File Bad Request Error

Thanks for the response, Evgene. Is there are specific folder in the Sources tab where this file needs to be replaced? There are so many (see image below):

Image

Return to “Issues”