Forum Moderators: phranque

Message Too Old, No Replies

Please Help - Need Ways For Vistors To Post Content

File uploading for webpages

         

tshirtdeal

11:58 pm on Feb 10, 2010 (gmt 0)

10+ Year Member



Hi,

I am a novice webmaster with a better understanding of marketing than technical stuff.

I am helping a friend with a site which is interactive. It requires that users can sign up for accounts and upload story files.

Is there a way to do this so that they can upload a document and it be directly linked on a particular web page or that the file be turned directly into a web page?

Right now I am having to take the uploaded file, open it, copy and paste it, build the page around it and link to the page. It is way to much work for the amount of uploads that come in...

Is there a better way to set up accounts people can upload story document files and users can instantly read them as well as for them to stay organized?

Some form of forum software or social site software?

I hope this makes sense and I really appreciate any help with this...

RT

Tommybs

7:35 am on Feb 11, 2010 (gmt 0)

10+ Year Member



What programming language is the site written in? PHP, .net? People might be able to offer a more complete solution if they know this. One option you could look into is sending the files with a header of download or attachment. It means people will leave your site but the document will open for them. You could always make this link open in a new window.

PHP has function such as fopen and fread that should allow you to open the file ( even file_get_contents() ). If you had one generic page such as story.php that accepts a querystring as a parameter.

e.g. story.php?id=4 Then you could do a database lookup on story_id 4 (presuming you store the upload details in a db) and then you can print out the contents.

One thing I will say is that you'll have to be very careful about what people are uploading in case someone tries anything dodgy, so I'd suggest looking into the security of these functions.

As a lost point I know there is a few WYSIWYG editors out there that have a 'paste from word' option. Some of these include tinyMCE and FCKEditor but setting these up securely might be a bit too much at present if you lack the technical skills.

Hope this helps somewhat