Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Uploading files to CF server

Status
Not open for further replies.

calista

Programmer
Jan 24, 2001
545
US
I am trying to figure out how to allow users to upload files to the server (at least to certain directories). For example, a user creates a document on his/her workstation(e.g. meeting minutes) and wants to publish it on the intranet. How do I go about this? I see the CFHTTP tag, but I don't see how that helps me. I wrote a little test template and was able to capture the server home page correctly.

Any guidance greatly appreciated! Thank you! Calista :-X
Jedi Knight,
Champion of the Force
 
Hey Calista,

In the simplest case, you can allow people to upload files with the <input type=&quot;file&quot;> and a corresponding <cffile action=&quot;upload&quot;..>. I think you're talking more about document publishing where they don't just upload a file, they upload content that becomes part of the website. If this is the case, the siimplest solution is to use the basic <cffile action=&quot;upload&quot;..> and only allow them to upload html files.

I've worked on projects similar to this and in most cases, the desired goal is to make it very easy for the user to publish content so requiring them to create an html file isn't an option. In this case, we usually create some type of form where they put in a subject, body, etc... and then store this in a database where it is retrieved and displayed in a template file.

Let me know what direction you're going in and I can give you some specific suggestions.
GJ
 
In broad terms, my job is to organize software and hardware documentation for a software engineering group and provide a web-based access to the documentation. The are a variety of different kinds of documents, including schematics, drawings, and other text documents.

I have created a form for one kind of documentation, software services, in which the user answers questions, checks boxes, and enters data in textarea boxes. I then take that information and process it into a finished document. This approach works well for this, because there is the same basic types of information for each service, and this allows them to be stored in a database and they can be presented in a consistent fashion.

I could do something similar for other types of documents, I suppose, but that's an aweful lot of forms. And what about schematics and drawings? The other consideration is that the database has size limits, so the entire document may not fit.(I'm using Access, and the Memo type has a maximum of 64K characters.) Calista :-X
Jedi Knight,
Champion of the Force
 
Hey Calista,

Unfortunately, what you're talking about isn't a trivial application. I've built some document publishing applications and there's a lot to them. The easiest approach is to make standardized templates as you've done but this doesn't allow for a lot of flexibility. To give the user the ability to add paragraphs, format headings, change font size, etc.. all through a document requires a lot of work. I'm not recommending you abandon the idea but I think you need to put some thought into what you want it to do (i.e. functionality, degree of flexibility) and then start identifying areas that will pose a problem to do. I can then help with those areas.

Good Luck,
GJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top