Archive of UserLand's first discussion group, started October 5, 1998.

system.verbs.builtins.html.ftpText

Author:Thomas A. Creedon
Posted:6/4/1999; 5:04:49 PM
Topic:system.verbs.builtins.html.ftpText
Msg #:7025
Prev/Next:7024 / 7026

Hello all,

My setup... Mac G3/Mac OS v8.6 Frontier 6

I'm working on a static site (not using mR). I loaded a PDF file into the ODB with a name like 'myPDFDocument.pdf'. I selected the entry and selected Publish Page. Everything went as expected. Except when the document was opened in Acrobat Reader, the page was blank.

Time to start diggin'!

Well, I uploaded the PDF document from the Finder via Anarchie. Went to the URL in Netscape and this time, the document opened just fine in AR.

I started to trace the code for Publish Page and discovered that system.verbs.builtins.html.ftpText sets up all files to be written with a type of 'TEXT'. I assumed at this point that Anarchie was doing it's thing in the background and translating end of line characters for upload to the server, which in this case, messed up the PDF file.

Here is my modified version of system.verbs.builtins.html.ftpText that seems to take care of my problem.

on ftpText (s, adrPageTable = html.getPageTableAddress ()) {
	«Fri, Jun 4, 1999 at 3:51:11 PM by TAC - replaced @websites.["#data"] with html.getPageTableAddress.  could this cause problems?
	if defined (adrPageTable^.fileWriter) { //new method
		«Fri, Jun 4, 1999 at 3:49:19 PM by TAC - replaced 'TEXT' with getBinaryType so binaries will upload properly on Mac
		html.writeFile (adrPageTable^.f, @s, getBinaryType (s), html.getPref ("textFileCreator", adrPageTable), clock.now (), adrPageTable)}
	else { //if fileWriters are not being used
		true}}

Any thoughts you have would be appreciated.

Userland, if you think these changes would be generally beneficial, please include them as time permits.

Thanks much,

Toodle-loooooooo.......
Thomas



There are responses to this message:


This page was archived on 6/13/2001; 4:50:36 PM.

© Copyright 1998-2001 UserLand Software, Inc.