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

Refactor mime type detection for uploaded files #912

Closed
ahayes opened this issue May 25, 2020 · 1 comment
Closed

Refactor mime type detection for uploaded files #912

ahayes opened this issue May 25, 2020 · 1 comment
Labels
Enhancement Desired improvement to design or implementation that adds value. Java Nunaliit Java related Media Handling Related to the uploading, processing, or rendering of multi-media
Milestone

Comments

@ahayes
Copy link
Member

ahayes commented May 25, 2020

Let's look at refactoring to use a Java library like Apache Tika to detect mime types of files uploaded through Nunaliit before handing the file off for any backed processing such as thumbnail generation, conversion, etc.

@ahayes ahayes added the Enhancement Desired improvement to design or implementation that adds value. label May 25, 2020
@ahayes ahayes added this to the 2.2.9 milestone May 25, 2020
sruest added a commit that referenced this issue Jun 10, 2020
sruest added a commit that referenced this issue Jun 10, 2020
@ahayes ahayes closed this as completed in cc776d9 Jun 11, 2020
sruest added a commit that referenced this issue Jun 11, 2020
…use the file class set in the document after the analyze work is completed.
sruest added a commit that referenced this issue Jun 11, 2020
@ahayes ahayes reopened this Jun 11, 2020
@ahayes
Copy link
Member Author

ahayes commented Jun 11, 2020

The fixes appear to work well now. I just wanted to toss some logs in here for what a successful upload of a video looks like.

2020-06-11 14:24:42,242[INFO ]: UploadServlet >welcome<
2020-06-11 14:24:42,452[INFO ]: ProgressServlet getIds
2020-06-11 14:24:42,479[INFO ]: UploadServlet >put<
2020-06-11 14:24:42,493[INFO ]: Upload progressId:progress0
2020-06-11 14:24:42,494[INFO ]: Upload uploadId:e63bfc57868da7f2caf4e36f1a02e9fb
2020-06-11 14:24:42,495[INFO ]: Upload file is Jean-Bosco Iyakaremye-Video2.m4v
2020-06-11 14:24:42,578[INFO ]: ProgressServlet getProgresses
2020-06-11 14:24:43,733[INFO ]: ProgressServlet getProgresses
### Lots of lines like these... then...
2020-06-11 14:27:10,271[INFO ]: ProgressServlet getProgresses
2020-06-11 14:27:11,333[INFO ]: ProgressServlet getProgresses
2020-06-11 14:27:11,899[INFO ]: File written to /home/nunaliit/atlascine_atlas/atlascine2/./media/upl4933229950025439108.m4v
2020-06-11 14:27:12,113[INFO ]: ProgressServlet getProgresses
2020-06-11 14:27:12,208[INFO ]: onLoad update: e63bfc57868da7f2caf4e36f1a02eb9c -> [Jean-Bosco Iyakaremye-Video2.m4v]
2020-06-11 14:27:12,354[INFO ]: Upload worker processing: Document Work(state:waiting for upload id:e63bfc57868da7f2caf4e36f1a02dffb uploadId:e63bfc57868da7f2caf4e36f1a02e9fb uploadRequestDocId:e63bfc57868da7f2caf4e36f1a02eb9c)
2020-06-11 14:27:12,515[INFO ]: Upload worker completed: Document Work(state:waiting for upload id:e63bfc57868da7f2caf4e36f1a02dffb uploadId:e63bfc57868da7f2caf4e36f1a02e9fb uploadRequestDocId:e63bfc57868da7f2caf4e36f1a02eb9c)
2020-06-11 14:27:12,566[INFO ]: Upload worker processing: Document Work(state:submitted id:e63bfc57868da7f2caf4e36f1a02dffb att:Jean-Bosco Iyakaremye-Video2.m4v)
2020-06-11 14:27:13,197[INFO ]: ProgressServlet getProgresses
2020-06-11 14:27:13,547[INFO ]: Upload worker completed: Document Work(state:submitted id:e63bfc57868da7f2caf4e36f1a02dffb att:Jean-Bosco Iyakaremye-Video2.m4v)
2020-06-11 14:27:13,600[INFO ]: Upload worker processing: Document Work(state:analyzed id:e63bfc57868da7f2caf4e36f1a02dffb att:Jean-Bosco Iyakaremye-Video2.m4v)
2020-06-11 14:27:13,831[INFO ]: FFmpeg full version: 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
2020-06-11 14:33:04,001[INFO ]: ImageMagick 6.9 VERSION_6_6 (Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org)
2020-06-11 14:33:04,078[INFO ]: Upload worker completed: Document Work(state:analyzed id:e63bfc57868da7f2caf4e36f1a02dffb att:Jean-Bosco Iyakaremye-Video2.m4v)
2020-06-11 14:33:04,111[INFO ]: Upload worker processing: Document Work(state:approved id:e63bfc57868da7f2caf4e36f1a02dffb att:Jean-Bosco Iyakaremye-Video2_thumb.jpg)
2020-06-11 14:33:04,168[INFO ]: Upload worker completed: Document Work(state:approved id:e63bfc57868da7f2caf4e36f1a02dffb att:Jean-Bosco Iyakaremye-Video2_thumb.jpg)
2020-06-11 14:33:04,187[INFO ]: Upload worker processing: Document Work(state:approved id:e63bfc57868da7f2caf4e36f1a02dffb att:Jean-Bosco Iyakaremye-Video2.mp4)
2020-06-11 14:33:11,743[INFO ]: Upload worker completed: Document Work(state:approved id:e63bfc57868da7f2caf4e36f1a02dffb att:Jean-Bosco Iyakaremye-Video2.mp4)
2020-06-11 14:33:11,772[INFO ]: Upload worker processing: Document Work(state:orientation id:e63bfc57868da7f2caf4e36f1a02dffb att:Jean-Bosco Iyakaremye-Video2_thumb.jpg)
2020-06-11 14:33:12,128[INFO ]: Upload worker completed: Document Work(state:orientation id:e63bfc57868da7f2caf4e36f1a02dffb att:Jean-Bosco Iyakaremye-Video2_thumb.jpg)

@ahayes ahayes closed this as completed in fb292e8 Jun 11, 2020
@ahayes ahayes added Java Nunaliit Java related Media Handling Related to the uploading, processing, or rendering of multi-media labels Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Desired improvement to design or implementation that adds value. Java Nunaliit Java related Media Handling Related to the uploading, processing, or rendering of multi-media
Projects
None yet
Development

No branches or pull requests

2 participants