[SOLVED] How to disable Required option for Size in File field?

More
8 years 2 months ago - 8 years 2 months ago #64801 by lipatovroman
Hi!

How to disable Required option for Size in File field?



Also, is it possible FC automaticly determine file size?

Thanks.
Last edit: 8 years 2 months ago by ggppdk.

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

More
8 years 2 months ago #64802 by ggppdk
Hello

hhhmm, is it a problem, that it is required ?

please explain the usage scenario

i guess reasons can be
- you do no display the size in frontend
- the file pointed by the URL can change size ...


-- 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
8 years 2 months ago - 8 years 2 months ago #64803 by ggppdk
Hello

hhmm agreed to remove it ... in v3.1.1
since it can be problematic , e.g. the file size of the file pointed by URL can change size much more easily than it can change extension


administrator/components/com_flexicontent/views/filemanager/tmpl/default.php
Code:
<td id="file-url-size-container"> <input type="text" id="file-url-size" size="44" class="required input-xxlarge" name="file-url-size" />

change class="required input-xxlarge"
to class="input-xxlarge"

PLEASE do not make any other changes to file
as they will be overwritten on 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...
Last edit: 8 years 2 months ago by ggppdk.

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

More
8 years 2 months ago - 8 years 2 months ago #64811 by lipatovroman
Ok, I just have experience in the use of other components.

I believe, that we should have ability to disable this parameter.

But if the option is enabled - FC should determine file size automaticly (for local and for external files).

Yes, file pointed by the URL can change size - but the probability of this is very small and we should have ability to change file size manually.

This is how it works in JDownloads:

Last edit: 8 years 2 months ago by lipatovroman.

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

More
8 years 2 months ago #64812 by ggppdk
Hello

for local files we do already
- for file via URL , i guess we can get file size via HTTP headers using CURL

(and in rare cases that CURL is not available we will not get it)

The code to do it seems to be little and already available:
stackoverflow.com/questions/2602612/php-...out-downloading-file

So i guess this should be an easy task, here is a short term issue:
Get file size of file URLs automatically during file URL data saving
github.com/FLEXIcontent/flexicontent-cck/issues/662

Together with ... this issue (which is much more work than the above)
Make download history / download statistics visible
github.com/FLEXIcontent/flexicontent-cck/issues/527

given v3.1.2 milestone


-- 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...
The following user(s) said Thank You: lipatovroman

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

More
8 years 2 months ago - 8 years 2 months ago #64813 by lipatovroman
Last edit: 8 years 2 months ago by ggppdk.

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

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