-
Notifications
You must be signed in to change notification settings - Fork 0
clach04/uploader
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Uploader by pyther <pyther@pyther.net> 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 Requirements: * http://webpy.org/ * Unix/Linx machine (currently requires crypt module) Installation: -Run Locally python index.py (http://localhost:8080) Not Recommend for daily usage -Configure the webserver correctly to use webpy script Move script to web server: tar -zcvf myuploader.tgz index.py static/ templates/ web/ ***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" ) Depending on server may want to create a .htaccess file to protect database/config file and auto defaulting to application URL: # Set the default handler. DirectoryIndex index.fcgi/ # deny access to user database <FilesMatch "app.db|uploader.ini"> Order deny,allow Deny from all </FilesMatch> NOTE web.py web/wsgi.py also need to be edited to NOT pass any params other than function into flups.WSGIServer() for runfcgi also updated application.py to call runfcgi() - Run `python index.py resetadmin` this will create the app.db database and prompt for the admin password. -Configure some simple variables. Either create `uploader.ini` with contents like: [config] uploadpath: /tmp uploadurl: http://www.example.com/uploads Or 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