Filename issues

Aman
Aman
Offline
0
Hi

Is it possible to define what you want the file name of files to be when a user goes to download them?

The issue I have is as follows.

I have a directory structure such as "Events/2012/02/my_audiofile.mp3

The name of the file when the user download ends up being something like "Events_2012_02_my_audiofile.mp3" whereas I just want it to be my_audiofile.mp3

So are there any options for filenames that I can adjust to get the desired result or for the filename to take the name of the file as defined in the database?

Thanks in advance and congrats on an amazing product.

Aman Singh
Responses (3)
  • Accepted Answer

    Tuesday, February 28 2012, 11:11 AM - #Permalink
    0
    well you would need some code changes for that... are you a coder? :)
    The reply is currently minimized Show
  • Accepted Answer

    Aman
    Aman
    Offline
    Monday, March 05 2012, 08:02 AM - #Permalink
    0
    I am but not as good as you! If you could give me some pointers where to look and what I might need to change, I would be really thankful...
    The reply is currently minimized Show
  • Accepted Answer

    Monday, March 05 2012, 11:15 AM - #Permalink
    1
    open file /views/file/view.raw.php

    on line 49 you find this:

    $this->fileName = $fileName ;

    you simply need to set there the filename you want. for instnace, use explode() function on $fileName with "/" and use the last piece. do you know what I mean?
    The reply is currently minimized Show
Your Reply