forked from clach04/uploader
-
Notifications
You must be signed in to change notification settings - Fork 0
aldoah0a/uploader
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Uploader by pyther <[email protected]> What is Uploader? Uploader is a simple webpy application that allows users to upload files to a web server and has support for user authentication. There is support for upload credits and user expiration dates. Uploader was created because I needed a simple platform to allow users to upload files to my web server. Features: -Set User Expiration Date - per user -Set upload credits - per user -Manage Users Files -Users can change their own passwords -Add users easily Installation: -Run Locally python index.py (http://localhost:8080) Not Recommend for daily usage -Configure the webserver correctly to use webpy script ***Lighttpd Example*** fastcgi.server = ( "/uploader.py" => (( "socket" => "/tmp/fastcgi-uploader.tmp", "bin-path" => "/home/http/uploader/index.py", "max-proc" => 1, "bin-environment" => ( "REAL_SCRIPT_NAME" => "/uploader" ), "check-local" => "disable" )) ) url.rewrite-once = ( "^/uploader/(.*)$" => "/uploader.py/$1" ) -Create Sqlite Database: create table sessions ( session_id char(128) UNIQUE NOT NULL, atime timestamp NOT NULL default current_timestamp, data text ); create table users ( id INTEGER PRIMARY KEY, name VARCHAR(20) NOT NULL, password VARCHAR(20) NOT NULL, credits INTEGER, exprdate DATETIME, usertype CHAR(5) NOT NULL ); # Username: admin, Password: admin, Usertype: admin insert INTO 'users' (name, password, usertype) values ('admin', 'tdlasp2ru0PJ6', 'admin'); To generate the password hash: python -c "import crypt; print crypt.crypt('yourPassword', 'td')" Alternatively use the example.db (username: admin, password: admin) Rename the database to app.db -Configure some simple variables in index.py uploadpath = physical path where all uploads will be stored - ex: /srv/http/example.com/uploads/ uploadurl = the url to access all uploaded files - ex: http://example.com/uploads/ MaxSize = Maximum Size of uploaded files for users MaxSizeAdmin = Maximum Size of uploaded files from Administrators Troubleshooting: *If you get an error about the database being unable to be read/opened check the permissions and make sure the web server can read/write the database. File bugs, feature requests, or anything else on the github page.
About
A webpy file uploader with basic authentication support
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published