Skip to content
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

Unabled to Upload File #981

Closed
romulogp opened this issue Mar 17, 2017 · 2 comments
Closed

Unabled to Upload File #981

romulogp opened this issue Mar 17, 2017 · 2 comments

Comments

@romulogp
Copy link

I've been trying to upload a file to api endpoint.

Expected outcome

Filed uploaded successfully.

Actual outcome

When using Content-Type: multipart/form-data i face and Internal Server Error:
{
"timestamp": 1489771142292,
"status": 500,
"error": "Internal Server Error",
"exception": "org.springframework.web.multipart.MultipartException",
"message": "Could not parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadException: the request was rejected because no multipart boundary was found",
"path": "/api/v1/invoices/upload"
}

And using Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW i face this error:
{
"status": 400,
"error": "Bad Request",
"exception": "org.springframework.web.multipart.support.MissingServletRequestPartException",
"message": "Required request part 'file' is not present",
"path": "/api/v1/invoices/upload"
}
PS.: That boundary value i've got from PostMan POST Request, which works great. if wasnt that, i could not even exit the Internal Server Error.

Versions

App: 9.14.64.305-stable
Chrome: 56.0.2924.87
Platform: Windows (10)

Steps to reproduce

  1. Select and add a file from System.
  2. Make a POST request using Content-Types mentioned above.
@romulogp romulogp changed the title Unabled to Send File Unabled to Upload File Mar 17, 2017
@Chanmoro
Copy link

Chanmoro commented Apr 6, 2017

I have faced same issue.

input on RestClient

Here is request data.
image

server side log

Server log said, no data is sended.

Caused by: org.apache.commons.fileupload.FileUploadException: the request was rejected because no multipart boundary was found
at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.(FileUploadBase.java:990)
at org.apache.commons.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:310)
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:334)
at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:115)
at org.springframework.web.multipart.commons.CommonsMultipartResolver.parseRequest(CommonsMultipartResolver.java:158)
... 40 more

packet capture

Also, packet capture with wireshark shows there is no file in http request.
image

Environment

App: 9.14.64.305-stable
Chrome: 57.0.2987.133
OS: Mac El Capitan (10.11.6)

@jarrodek
Copy link
Owner

jarrodek commented Apr 7, 2017

Hi,

This is duplicate of the #945
Because it's a huge bug (in Chrome this time, not the app) that affects core of the application I'm still working on it.

I'm closing as a duplicate but subscribe to referenced bug for updates.

@jarrodek jarrodek closed this as completed Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants