EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #06000


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] get_mime_type?


Thanks, Thomas, $doc->get_value( "mime_type") works! 
Also, thanks, John, I'm familiar with the redo_mime_type command; I think I understand this one:
The one that is more mysterious is redo_thumbnails.
For video documents, if you have FFMPEG and the H264 codec on the server, this transcodes to video to MP4 and OGG.
What does EPrints do with these transcoded files?  Do they get served to the public?  
Where does EPrints put them?  Is there an API call to get these derivative files for the document?

Best wishes,
Tomasz


-----Original Message-----
From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of John Salter
Sent: October-13-16 5:35 AM
To: eprints-tech@ecs.soton.ac.uk
Cc: Tomasz Neugebauer <Tomasz.Neugebauer@concordia.ca>
Subject: Re: [EP-tech] get_mime_type?

Might be worth mentioning that there is a function in bin/epadmin to redo mime types.

If you upgraded from 3.3.1 to 3.3.2, a suggestion to run this was made, but you can run it if it looks like your mime types are not quite right (and as file type detection improves).

>From the perldoc:
epadmin redo_mime_type repository_id dataset [ objectid, ... ]
    Re-run the file format identification. Dataset may be one of 'document' or 'file'. If 'document' only re-does the identification of the main files in documents.


Cheers,
John

-----Original Message-----
From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Thomas Lauke
Sent: 13 October 2016 09:09
To: eprints-tech@ecs.soton.ac.uk
Cc: tomasz.neugebauer@concordia.ca
Subject: Re: [EP-tech] get_mime_type?

Hi Tomasz,

> How would I get the mime_type of a document in EPrints?

refering to ~/Eprints/perl_lib/EPrints/DataObj/Document.pm imho $doc->get_value( "mime_type" ); does the job!?

Hth
Thomas
*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/