D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Uploading to a web site

 

Simon Avery wrote:
> Neil Winchurst wrote:
>> I use FireFTP to transfer files to my web site. Being new to all this I
>> have become a little confused about the best way. 
>>
>> I can choose between Automatic, Binary or ASCII mode. Sometimes I am
>> told that certain files must be uploaded in the ASCII mode, sometimes
>> it is Binary which is a must, sometimes it seems to be left to me.
> 
> Just leave it on Automatic.

Yeah,

From Linux to Linux it won't matter if you do everything in binary.

It only matters if the two systems have a different representation of
certain file types like end of line (CR versus CR/LF) in text files.

Almost all web software can handle either CR or CR/LF line endings in
text files, so even when uploading from MS Windows to Linux/Unix, it is
usually safe to upload/download in binary. Since this just means the
files on the Linux box will get Windows end of lines, and VIM will say
"dos mode" if you edit it on the server. But Apache and web browser
don't care.

Now if you'd asked about transferring image files from VMS to Unix...

As Simon says "doing binary files as ASCII" will break them (going from
Windows to Linux or back), but doing text files as binary is rarely a
problem these days (as long as you don't use Notepad on Windows as your
main text editor, but Wordpad works "just fine" with CR only text files).

We have files transferred via FTP, or via Samba (FTP may do the line end
conversions, Samba isn't doing it) all day long, all the time, and it is
perhaps an issue once every 6 months or so when we do something new and
weird, or I get ambitious and mess up with search and replace of
multi-line text using regular expressions.


Attachment: signature.asc
Description: OpenPGP digital signature

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html