Home>Article>Java> How to upload video in java

How to upload video in java

coldplay.xixi
coldplay.xixi Original
2020-08-21 09:19:54 4383browse

How to upload video in java: first define the layout file html, and load the video playback tag in a new window; then get the time and convert it into a string, and use the jsp file to select the video file and submit it to the background; finally process the java file Then go to [upload_video.jsp] through control and demonstrate.

How to upload video in java

[Related learning recommendations:java basic tutorial]

How to upload videos in java:

1. First, the code of the jsp page here defines the layout file html as shown in the figure

How to upload video in java

2. This is a js file that opens a new sub-window. And load the video playback tag into the page

How to upload video in java

3. Upload the file java code to get the time and convert it into a string as the file name after uploading and set the save path and pass the value to jsp Page

How to upload video in java

#4. The copy code here copies a source file to a new directory path as shown in the figure

How to upload video in java

5. The jsp file uploaded here is used to select video files and submit them to the backend

How to upload video in java

#6. Display the old file name, the new file name and the uploaded file directory path, and Passed to the parent page, index.jsp

How to upload video in java

7, the code submitted by the upload.jsp file is processed by the java file and transferred to upload_video.jsp

through control.How to upload video in java

8. The code snippet has been posted. Next, we will start the demonstration interface and click the upload button as shown in the picture.

How to upload video in java

9. Click Select File to find the video file to be uploaded, select Open and click the OK button

How to upload video in java

10. Here is the interface that displays the old and new file names and file directory paths. Click OK to change the file directory. Pass it to the parent file interface

How to upload video in java

#11. As shown in the figure, the directory path has been given to the input. Click the play button, the playback interface will appear and the playback will occur automatically

How to upload video in java

Related learning recommendations:Programming video

The above is the detailed content of How to upload video in java. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn