Keep server disk filename same as Original upload filename

More
11 years 2 months ago #52236 by jeffhoneyager
When adding an item...

When I upload a file (field type = file), the "File name" gets changed to a date format.

On the server, the filename is that new name.

How do I keep the filename (on the server) the same as the source file name?

Thanks.

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #52238 by ggppdk
Hello

in v2.2.0/v2.2.1,

the original filename is preserved in DB column thus original filename

-a- can be displayed
-b- when download starts the filename is set as HTTP header thus it download to the client with the original name


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #52239 by jeffhoneyager
We need it to be saved on the server with the original filename.

Within the year, we will be updating all those files (there will be hundreds). If we keep the original filenames, then the updates will be an FTP transfer.

Please let me know how we can keep the filenames on the server as the same.

Thanks so much.

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #52241 by ggppdk
Hello

please don't hack files, unless asked to do so, it is critical to be able to update FLEXIcontent !



do you know that your server will save such filenames without problems ?

Inside file:
components/com_flexicontent/classes/flexicontent.helper.php

find:

$chars = '[^0-9a-zA-Z()_-]';
$filename = strtolower( preg_replace( "/$chars/", '-', $filename ) );


and comment it out, and then retry,

if it works, i will put a parameter for this for next version

(if it new website, then you can use current GitHub version too)


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #52245 by jeffhoneyager
Found location for
Code:
$chars = '[^0-9a-zA-Z()_-]'; $filename = strtolower( preg_replace( "/$chars/", '-', $filename ) );

Line 3618, 3619

Commented them out

It did not keep the filename; it changed it as before the mod. was made.

No Effect

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #52251 by ggppdk
Hello

yes it is not enough

try also to put in comments (same file):

$file = date('Y-m-d-H-i-s').".".flexicontent_upload::getExt($file);


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #52266 by jeffhoneyager
SOLVED!

That did the trick.

Thank you so much for your help.

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #52268 by ggppdk
Hello

do you allow frontend users to submit content ?

we will need to test more,

and also provide parameter for this
see new enhancement issue here:
github.com/FLEXIcontent/flexico ... issues/118


please do not make any other hacks, you will not be able to upgrade !!!


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #52273 by jeffhoneyager
The site will allow front end users to submit content - but registered and above only.

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #52364 by jeffhoneyager
Not quite solved...

The file will not download and the front end shows (0KBs) for every file.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save