Re: [users@httpd] Showing exact filesize in bytes instead of shortform in directory listing

2016-10-03 Thread Marat Khalili


On 03/10/16 19:35, Rich Bowen wrote:
Or use rsync 


WebDAV would be more on-topic.

--

With Best Regards,
Marat Khalili

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Showing exact filesize in bytes instead of shortform in directory listing

2016-10-03 Thread Rich Bowen


On 09/30/2016 09:55 AM, Christopher Schultz wrote:
>> > Background: I want to mirror the directory with lftp, and lftp can
>> > not read the given filesize correctly out of the index. So lftp has
>> > to make HEAD requests to get the file size for each file. The
>> > additional HEAD requests would be not necessary if the index
>> > returns the exact file size.
>> > 

> It sounds like this is a good candidate for a web service which
> returns exactly the information you need and no more. For example, if
> you were to return the list of files and their file sizes as a CSV or
> something simpler than an HTML document, you would be able to do it
> even more easily.

Or use rsync

-- 
Rich Bowen - rbo...@rcbowen.com - @rbowen
http://apachecon.com/ - @apachecon



signature.asc
Description: OpenPGP digital signature


Re: [users@httpd] Showing exact filesize in bytes instead of shortform in directory listing

2016-09-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Cie,

On 9/30/16 5:59 AM, Cie wrote:
> In Apache server 2.4, when activating the IndexOptions
> +FancyIndexing in the httpd.conf, the directory listing shows the
> file size of a file like in the following example:
> 
> exported_file.pdf 2.1M
> 
> The file size display is accumulated to Kilobytes (K) or Megabyte
> (M). The exact file size is 2176555 bytes, but instead "2.1M" is
> shown.
> 
> Is there a way to configure Apache server to show the exact file
> size in bytes in the directory listing? I had a look into the
> Apache documentation of [mod_autoindex]
> http://httpd.apache.org/docs/2.4/mod/mod_autoindex.html but have
> not found anything suitable.
> 
> Background: I want to mirror the directory with lftp, and lftp can
> not read the given filesize correctly out of the index. So lftp has
> to make HEAD requests to get the file size for each file. The
> additional HEAD requests would be not necessary if the index
> returns the exact file size.
> 
> Thank you very much and kind regards

It sounds like this is a good candidate for a web service which
returns exactly the information you need and no more. For example, if
you were to return the list of files and their file sizes as a CSV or
something simpler than an HTML document, you would be able to do it
even more easily.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJX7m7hAAoJEBzwKT+lPKRYjKQP/j3V6tkCYgcvpb4NTcJ3NkZm
TImeJAtJ8tUBFgAho9pWBUSyV43SSnR6ZI4Qv6bAEYyvcJyJPW85O0trpqvCxcKU
EIPBKr/dnTp8OCHcnz/7ZiL17mDPuzNwTart7GUlYHDN++W7PP3JgZuJ6awkVNyN
pmlHrSqLmaQOLlJ52w2PqPrqmCs8tz3VoTtkpMxTlGjvqaFHD83f2zKD/IYJDNpq
k6TpsOkVEzHPEYJNuC9Kp6acxRURVjLFZWdEHM4sKSmYTIo465KW71XJpeEr4g96
2uBIAs/GRZO0OLgY5yfH2b0SvYbrof+j4KF6CaabtI1ZSZIvwFhLIQmK7wNr4FU1
uYCPrauEi8vUsFGhC7E1/YJfHj/8cpfTgrHXGtBdGoMq1iOv/DL3filIIVwf0Li8
Kcj8Vc0uR8hm2lQqrWasfw3grCmoXR2Sykk8pxY4FghlWB2VrnO8FNyaE4u/pXrw
3nv/KvCICxIRKDwCM4GiaKCtG4NIkl5pU1XBhgZmA7x/Zg6gJ8yidPscxO5YiVqT
XUudc4h5DCpVXvCkkcIX+b47Ec7ZTclpx5YDS7C0Gq+fBVwMmDnMNCLriE1pEObN
ubRJeTgzGubfp40wJqztJv8aqXyGMqF/AXDnOD6cy1yj5NU3RFp3GYPKsCuDJJ1o
Kr4m8DImijTsPMnO5110
=1iUT
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[users@httpd] Showing exact filesize in bytes instead of shortform in directory listing

2016-09-30 Thread Cie
In Apache server 2.4, when activating the IndexOptions +FancyIndexing in the
httpd.conf, the directory listing shows the file size of a file like in the
following example:

exported_file.pdf 2.1M

The file size display is accumulated to Kilobytes (K) or Megabyte (M). The exact
file size is 2176555 bytes, but instead "2.1M" is shown.

Is there a way to configure Apache server to show the exact file size in bytes
in the directory listing?
I had a look into the Apache documentation of [mod_autoindex]
http://httpd.apache.org/docs/2.4/mod/mod_autoindex.html but have not found
anything suitable.

Background: I want to mirror the directory with lftp, and lftp can not read the
given filesize correctly out of the index. So lftp has to make HEAD requests to
get the file size for each file. The additional HEAD requests would be not
necessary if the index returns the exact file size.

Thank you very much and kind regards