We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Plugin Request: File Size Tag?

Development and Programming

davidrussell's avatar
davidrussell
102 posts
17 years ago
davidrussell's avatar davidrussell

I’ll wait it out. Thanks again for helping me out on this. I am under some strain right now with projects as well, so I know the feeling. 😊

       
ExpressionEngineer's avatar
ExpressionEngineer
148 posts
17 years ago
ExpressionEngineer's avatar ExpressionEngineer

Thanks, I’ll get back to you on monday.

       
rchampagne's avatar
rchampagne
212 posts
15 years ago
rchampagne's avatar rchampagne

thought I’d revive this thread. I am using this plugin, which I must say is awesome!

I am receiving an error here and there with particular files though which doesn’t make sense. here is a peak at the code

template code:

<dl><dt>» Software</dt>
     <dd>{exp:weblog:entries weblog="brochures" search:bbrand="toshiba" search:bcat="ipsoftware" }
<a href="http://{brolink}">{title}</a>{exp:filesizer filename="{brolink}" upload_pref="3" decimals="1" zero_decimals="no"} {fs:file_size}{fs:size_unit} {/exp:filesizer}  {if no_results} No manuals for this category yet! {/if}

     {/exp:weblog:entries}
     </dd></dl>

rendered page:

NVR Software <– that is a link (works) Error opening file: “F:/web/silmaritsite/files/manuals/NVR_software.pdf” <– this is where the filesize normally shows.

It is very strange. it is the exact same code everywhere, but in some small instances it isn’t working. I thought it might be because of the length of the filename, but that is not the case. (have both short and long file names its happening to).

       
rchampagne's avatar
rchampagne
212 posts
15 years ago
rchampagne's avatar rchampagne

i think i found the problem.

I have files that are in a subdirectory of the specified file upload directory. All of those, the filesize plugin isn’t noticing the subdirectory in the rendered path.

Now, how could we fix that??

       
kaydie's avatar
kaydie
2 posts
15 years ago
kaydie's avatar kaydie

Nice work, however one (tiny little) thing:

-> 1 kilobyte (kB) = 8 kilobits (kb) 😉

       
mahalie's avatar
mahalie
60 posts
15 years ago
mahalie's avatar mahalie

This very useful, it allowed me to get rid of a few user-input fields. I’m using it for press release attachments (example).

I heard about it on episode one of http://ee-podcast.com/

Thank you!

       
First 2 3 4

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.