Not logged in. · Lost password · Register
Forum: General Help and Support Development RSS
Getting the name of a media file
Avatar
Restless #1
User title: Restless
Member since Jan 2018 · 4 posts · Location: Richmond, TX
Group memberships: Members
Show profile · Link to this post
Subject: Getting the name of a media file
In a plugin I want to be able to read and manipulate the contents of an uploaded media file.  How do I get the filesystem filename of the media file in my plugin, when right now it seems all I can get is the namespace and filename within the wiki?

For instance, if I have a media file titled
:user:somemediafile.svg
I want to be able to convert it to
/var/www/html/path/to/my/wiki/data/media/user/somemediafile.svg
or whatever the equivalent on that server is.

Thank you!
Avatar
turnermm (Moderator) #2
Member since Oct 2009 · 4805 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
mediaFN($id)
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
Restless #3
User title: Restless
Member since Jan 2018 · 4 posts · Location: Richmond, TX
Group memberships: Members
Show profile · Link to this post
Thank you very much!
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2020-04-04, 11:52:53 (UTC +02:00)