cancel
Showing results for 
Search instead for 
Did you mean: 

End-user easy upload to webspace ?

N/A

End-user easy upload to webspace ?

Probably a dumb question Wink ...but can anyone point me in the right direction to provide some kind of "easy upload" form/script which would enable me to provide a way for non-technical end-users to upload files to named folders on our company webspace (on F9 servers) ?

My users would not want to use a full FTP client... I was hoping for something which hides the complexity from them... maybe they could be restricted to uploading to a specific folder only (from files which are stored on their local folders).

I've seen some ASP things... but am I correct in thinking that ASP is not supported by F9 ?

Many Thanks for any comments.
Andy Keys
4 REPLIES
JonathanW
Grafter
Posts: 2,648
Registered: 02-10-2007

End-user easy upload to webspace ?

If you do a google search, you should be able to find some form of php upload script. There's a few out there, and they basically consist of two pages, one with an html form on it, so you can select the file, and then another with some php code in it that handles the upload itself.
N/A

End-user easy upload to webspace ?

Quote
If you do a google search, you should be able to find some form of php upload script. There's a few out there, and they basically consist of two pages, one with an html form on it, so you can select the file, and then another with some php code in it that handles the upload itself.



lol it just shows how much force9 employes know about coding...

Heres The PHP Code
<?php

////////////////////////////////////////////////
//A Simple file upload script
//Use Copy and paste the code
//create a file with the code called upload.php
//
////////////////////////////////////////////////


$action = $_POST["action"];
$max_size = "1048576"; // Max size in BYTES (1MB)

//Now for the HTML. """Oh Not 2 files force9"""

echo "
<b>Uploader</b><br>
<form action='upload.php' method=post enctype='multipart/form-data'>
File (max size: $max_size bytes/".($max_size/1024)." kb):<br>
<!-- This is NOT a secure method of checking filesize,but it tells the user if he tried to upload a file too big before
he waits for the huge file to upload, make sure to check the
filesize after the form is sent as well -->
<input type='file' name='filename'><br>
<input type='hidden' name='action' value='upload'>
<input type='submit' value='Upload File'>
</form>";

if ($action == 'upload')
{


if ($_FILES["filename"]["size"] > $max_size) die ("<b>File too big! Try again...</b>");

//note the "./" in the line below this is where your files will be uploaded too

copy($_FILES["filename"]["tmp_name"],"./".$_FILES["filename"]["name"]) or die("<b>Unknown error!</b>");
echo "<b>File Uploaded.</b>"; // for debug --> $filename --> ".$destination."/".$filename_name."</h2>";


}

?>



GOTO http://php.resourceindex.com/Complete_Scripts/ for loads of scripts including your FTP script if you dont use this one.

also check out http://cherone.co.uk for more of my custom scripts
N/A

End-user easy upload to webspace ?

Thanks for your kind help. I will try this.
JonathanW
Grafter
Posts: 2,648
Registered: 02-10-2007

End-user easy upload to webspace ?

Quote
lol it just shows how much force9 employes know about coding...


Well, php isn't really my thing. But most of the examples out on the web all use two files, so you can blame them for my response :p