Everyone
I need one help for building application as Document Parser. What am I doing is to convert docx to pdf in spring boot and sending file over REST channel.
But I have doubt that is it a good practise of sending file or we should convert the file first save it somewhere in server like amazon and then send the download link to user to download.
Because in my spring boot application too it is also saving the file and sending it.
I don't know the right procedure.
Any suggestions would be a great help, that how to deal with this problem.
Related
I have a Spring MVC application that is deployed in Apache Tomcat 9 Webserver. Is it possible to calculate checksum as the file is being uploaded by the user? Where should I even begin looking if I wanted to do this?
To be specific, I understand that I can calculate checksum inside a #Controller class in Spring MVC. However, at this point in time, the file is completely uploaded to the temporary file upload directory. I am, specifically, asking if there is a way to calculate the checksum of the individual parts as a MultipartFile object is being uploaded/created. Do I have to override Apache Tomcat behaviour? Is it possible to do this without modifying Tomcat source code? If not, what is the potential impact of such a modification of Tomcat source code?
I do not understand the intricacies of webservers and would appreciate it if someone could tell me where to start looking.
Yes, you can't calculate the checksum before you have all the file content. Do you have access to the front end part? If you have, you can calculate the checksum via Javascript and put that information in your request header.
But in this case, you may not be able to use MultipartFile component in Spring, you might need to use apache upload library directly, you have more low level control to allow you to read header before you start to get the file content streaming.
I am creating an android application that is connected to the parse back end at the moment. My question is how do i upload data like text, images,and video from my computer directly to parse and then be able to call it from my app. ive been doing some research and i seen things like rest api and accessing it through Http. i just want to see whats best for my case.
so basically my question is how do i upload data to parse from my computer.
im kind of new to this and any help would be appreciated
Thanks
if you just need to upload a few files then you can do it from the Parse dashboard. For a large number of files write a script that call the Parse REST API
I am a newbie to spring and mvc framework.
I am going through the framwork and i wanted to understand the File upload (multiple) and use spring to load my complex object.
I have seen example using MultiPartFile for single file upload.
I tried the same for trying out the multiple file upload but I failed where i tried to make generic (like allowing the user to upload as many files).
Is there a way to do it in a optimal way to have the files available as list in the controller?
Thank you for reading!!!
is there a way to handle this without using multipart resolver?
Take a look at my answer to a similar question here:
Preserving value for <form:input type="file"> with Spring MVC
This explains our approach of an asynchronous file upload handling and processing of them on a final form submit.
I have used jquery.form.js. You can find example using Google. If not you can tell me to post a link. Moreover you should investigate how the browsers will handle the upload process (i.e.
i try to create a web site where it will provide an option to the user to upload a pdf file. I want this pdf to be saved on the server with specific url. For example:
The user select the title.
The user upload the file.
I want after these actions the file to be accessible via a specific url/name_the_user_give.
I saw that the Spring MVC provides very easy interface for file uploading.I already see many tutorial about this but my problem is how can i save the paper into a server.Also i want the pdf to open by the browser's tools.Can anyone give me directions?
To save the file on server path you simply needs to write the file stream to the path described by
request.getServletContext().getRealPath("your directory name here");
and then create the file using the real path you get.
And to show the pdf file using browser plugin, you should use following in your controller method.
#RequestMapping(value="url to map", produces={"application/pdf"})
Hope this helps you.
Cheers.
Our team is looking to support multiple concurrent uploads in struts2 (i.e. "ajaxy", gmail-style file uploads, with progress bars, that
begin immediately instead of when the user submits the form).
We are wondering if there are any tips or best practices for
implementing this feature. For example, does struts require any
special handling for XHR multipart requests? Also, is it appropriate
to use the FileUploadInterceptor for this sort of thing, or is it
better to roll our own?
We've briefly looked at ajax-file-upload-struts2
but it looks as
though that project is either abandoned or incomplete (if that's wrong
please let me know).
As for the client side, we've looked at swfupload, plupload, and
uploadify. They seem to have their various strengths/weaknesses but
if anyone has a found a solution that they prefer we'd love to hear
it.
Struts2 already provides multiple file uploads functionality and its a good one in its own since its doing all the underlying work for you.i believe doing yourself means again doing the same work.
you can have look at current implementation of multiple file upload implementation and can tweak it as per your requirements
here is official document for the multiple file upload using struts2
Multiple File Uploads