Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

Text-mode FTP?

I'm trying to keep CGI scripts inside CD, so I don't have to upload them separately. Problem : CD appears to upload everything in binary mode. I've tried both publishing as an article and as a standalone.cgi file.

There is a kludge : publish locally then use an FTP program that understands what's binary and what's text. But - is there any way to get CD to upload specified extensions (cgi,pl) in text mode?

Michael Wild
Monday, March 31, 2003

OK, I figured out a better kludge, here it is for anyone else who wants to do this :

1. Use an editor that will save files in Unix text format - I'm using PFE.
2. In CD, set this editor as the default for the appropriate file types (eg .pl .php .cgi), and mark them as not containing Cityscript.
3. Create the files using "new HTML", then change the filename as appropriate.
4. Edit as required.

The files will still be uploaded in binary mode, but as they're now in Unix text format on the PC that's OK.

Which leads to a request for the file-type dialogue in the next version of CD. Could it please allow specification, by filetype, of :
- the upload mode
- the Unix permissions (if different from 644)

Michael Wild
Monday, March 31, 2003

It would be nice to have CityDesk figure out ascii or binary mode automatically from the file extension.  Better yet, have a program-wide configuration setting that can be modified by the user. 

Binary mode puts a lot of ^M stuff at the end of ascii files because Unix uses only Carriage returns instead of carriage return + line feed to end a line.

David Burch
Monday, March 31, 2003

I hadn't thought of this issue; I'll add it to our wishlist.

Joel Spolsky
Monday, March 31, 2003

*  Recent Topics

*  Fog Creek Home