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

FileNotFoundException exception for MultipartFile resource file #256

Open
viraj-dhamal opened this issue Jul 14, 2022 · 0 comments
Open

Comments

@viraj-dhamal
Copy link

I am trying to read Multipart file but getting below exception-
Caused by: java.io.FileNotFoundException: MultipartFile resource [file] cannot be resolved to absolute file path

I am using below code to read file-

Workbook workbook = StreamingReader.builder()
                    .rowCacheSize(100)    // number of rows to keep in memory (defaults to 10)
                    .bufferSize(4096)     // buffer size to use when reading InputStream to file (defaults to 1024)
                    .open(multipartfile.getResource().getFile());

When I am passing input stream its working fine. For performance purpose I want to pass file object to open method.
Any suggestions would appreciate.

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

1 participant