[Fixed r1968] File download ignore file name

More
10 years 8 months ago #49573 by jrodgar
Hi!

r1967

I import some files via fleximport

When try to downloading them, its filename is something like "24", "23", looks like the name given is the id


When researching this, I find that on the files, I have like 3 different fields regarding the file name, "file name", "original file name", "file title". The second one is empty, and when filled, it worked properly.


Uploading a file via the item form, looks like its working ok (and the "orifinal file name" is filled)

There have been changes recently that affect this?

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

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

More
10 years 8 months ago #49577 by ggppdk
Hello

r1955/r1967 have added utf-8 support for filenames, thus the original filename is kept in a new DB table columun "filename_original"

when downloading, the browse is instructed to rename the file being downloaded via an HTTP header directive,

the directive is using "filename_original" and if not set it is using "filename", it seems that in your case the file was saved using id as filename


In short, i don't think that the download task is ignoring filename, instead i believe your file was saved on disk with id as filename (and note i did not say file title i said file 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...

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

More
10 years 8 months ago #49592 by jrodgar
Checked, is not that, went to components/com_flexicontent/uploads and they have there the proper name. Changing it here shows a message FLEXI_REQUESTED_FILE_DOES_NOT_EXIST_ANYMORE, so I´m renaming the correct file


On the database, the columns are filename, filename_original, altname. Filename_original is empty for this imported files,

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

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

More
10 years 8 months ago #49597 by Rooney
This is a big bug!!! Go to your own download area. Try to download the version 67 with firefox. It renames the file and saves it as 17.html or something!
Rooney

Joomla! 3.9.24 and FC 3.3.9

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

More
10 years 8 months ago #49598 by ggppdk
Hello

yes,
i confirm this bug,

if "filename_original" is empty then
the filename of the downloaded file is the file id

but also the extension is wrong

will make a fix ASAP

(about our main download i have fixed it)

Regards


-- 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...

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

More
10 years 8 months ago #49600 by ggppdk
Hello

fix is to replace
(in file)
components/com_flexicontent/controller.php
Code:
$download_filename = isset($dlfile->filename_original) ? $dlfile->filename_original : $dlfile->filename;

with:
Code:
$download_filename = strlen($dlfile->filename_original) ? $dlfile->filename_original : $dlfile->filename;

will download package tomorrow

Regards


-- 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...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.382 seconds
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