mirror of
				https://github.com/9001/copyparty.git
				synced 2025-11-04 13:53:18 +00:00 
			
		
		
		
	Compare commits
	
		
			3 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					35dce1e3e4 | ||
| 
						 | 
					f886fdf913 | ||
| 
						 | 
					4476f2f0da | 
							
								
								
									
										14
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								README.md
									
									
									
									
									
								
							@@ -127,6 +127,7 @@ summary: all planned features work! now please enjoy the bloatening
 | 
			
		||||
  * ☑ basic: plain multipart, ie6 support
 | 
			
		||||
  * ☑ up2k: js, resumable, multithreaded
 | 
			
		||||
  * ☑ stash: simple PUT filedropper
 | 
			
		||||
  * ☑ unpost: undo/delete accidental uploads
 | 
			
		||||
  * ☑ symlink/discard existing files (content-matching)
 | 
			
		||||
* download
 | 
			
		||||
  * ☑ single files in browser
 | 
			
		||||
@@ -215,10 +216,11 @@ example:
 | 
			
		||||
## tabs
 | 
			
		||||
 | 
			
		||||
* `[🔎]` search by size, date, path/name, mp3-tags ... see [searching](#searching)
 | 
			
		||||
* `[🧯]` unpost: undo/delete accidental uploads
 | 
			
		||||
* `[🚀]` and `[🎈]` are the uploaders, see [uploading](#uploading)
 | 
			
		||||
* `[📂]` mkdir, create directories
 | 
			
		||||
* `[📝]` new-md, create a new markdown document
 | 
			
		||||
* `[📟]` send-msg, either to server-log or into textfiles if `--urlform save`
 | 
			
		||||
* `[📂]` mkdir: create directories
 | 
			
		||||
* `[📝]` new-md: create a new markdown document
 | 
			
		||||
* `[📟]` send-msg: either to server-log or into textfiles if `--urlform save`
 | 
			
		||||
* `[🎺]` audio-player config options
 | 
			
		||||
* `[⚙️]` general client config options
 | 
			
		||||
 | 
			
		||||
@@ -312,8 +314,10 @@ you can also zip a selection of files or folders by clicking them in the browser
 | 
			
		||||
## uploading
 | 
			
		||||
 | 
			
		||||
two upload methods are available in the html client:
 | 
			
		||||
* `🎈 bup`, the basic uploader, supports almost every browser since netscape 4.0
 | 
			
		||||
* `🚀 up2k`, the fancy one
 | 
			
		||||
* `[🎈] bup`, the basic uploader, supports almost every browser since netscape 4.0
 | 
			
		||||
* `[🚀] up2k`, the fancy one
 | 
			
		||||
 | 
			
		||||
you can undo/delete uploads using `[🧯] unpost` if the server is running with `-e2d`
 | 
			
		||||
 | 
			
		||||
up2k has several advantages:
 | 
			
		||||
* you can drop folders into the browser (files are added recursively)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
# coding: utf-8
 | 
			
		||||
 | 
			
		||||
VERSION = (0, 12, 2)
 | 
			
		||||
VERSION = (0, 12, 4)
 | 
			
		||||
CODENAME = "fil\033[33med"
 | 
			
		||||
BUILD_DT = (2021, 7, 29)
 | 
			
		||||
BUILD_DT = (2021, 7, 30)
 | 
			
		||||
 | 
			
		||||
S_VERSION = ".".join(map(str, VERSION))
 | 
			
		||||
S_BUILD_DT = "{0:04d}-{1:02d}-{2:02d}".format(*BUILD_DT)
 | 
			
		||||
 
 | 
			
		||||
@@ -401,17 +401,18 @@ class AuthSrv(object):
 | 
			
		||||
        if uname == "":
 | 
			
		||||
            uname = "*"
 | 
			
		||||
 | 
			
		||||
        for un in uname.split(","):
 | 
			
		||||
            if "r" in lvl:
 | 
			
		||||
            axs.uread[uname] = 1
 | 
			
		||||
                axs.uread[un] = 1
 | 
			
		||||
 | 
			
		||||
            if "w" in lvl:
 | 
			
		||||
            axs.uwrite[uname] = 1
 | 
			
		||||
                axs.uwrite[un] = 1
 | 
			
		||||
 | 
			
		||||
            if "m" in lvl:
 | 
			
		||||
            axs.umove[uname] = 1
 | 
			
		||||
                axs.umove[un] = 1
 | 
			
		||||
 | 
			
		||||
            if "d" in lvl:
 | 
			
		||||
            axs.udel[uname] = 1
 | 
			
		||||
                axs.udel[un] = 1
 | 
			
		||||
 | 
			
		||||
    def _read_volflag(self, flags, name, value, is_list):
 | 
			
		||||
        if name not in ["mtp"]:
 | 
			
		||||
 
 | 
			
		||||
@@ -346,12 +346,37 @@ class HttpCli(object):
 | 
			
		||||
            static_path = os.path.join(E.mod, "web/", self.vpath[5:])
 | 
			
		||||
            return self.tx_file(static_path)
 | 
			
		||||
 | 
			
		||||
        x = self.asrv.vfs.can_access(self.vpath, self.uname)
 | 
			
		||||
        self.can_read, self.can_write, self.can_move, self.can_delete = x
 | 
			
		||||
        if not self.can_read and not self.can_write:
 | 
			
		||||
            if self.vpath:
 | 
			
		||||
                self.log("inaccessible: [{}]".format(self.vpath))
 | 
			
		||||
                raise Pebkac(404)
 | 
			
		||||
 | 
			
		||||
            self.uparam["h"] = False
 | 
			
		||||
 | 
			
		||||
        if "tree" in self.uparam:
 | 
			
		||||
            return self.tx_tree()
 | 
			
		||||
 | 
			
		||||
        if not self.vpath and "stack" in self.uparam:
 | 
			
		||||
        if "delete" in self.uparam:
 | 
			
		||||
            return self.handle_rm()
 | 
			
		||||
 | 
			
		||||
        if "move" in self.uparam:
 | 
			
		||||
            return self.handle_mv()
 | 
			
		||||
 | 
			
		||||
        if "scan" in self.uparam:
 | 
			
		||||
            return self.scanvol()
 | 
			
		||||
 | 
			
		||||
        if not self.vpath:
 | 
			
		||||
            if "stack" in self.uparam:
 | 
			
		||||
                return self.tx_stack()
 | 
			
		||||
 | 
			
		||||
            if "ups" in self.uparam:
 | 
			
		||||
                return self.tx_ups()
 | 
			
		||||
 | 
			
		||||
            if "h" in self.uparam:
 | 
			
		||||
                return self.tx_mounts()
 | 
			
		||||
 | 
			
		||||
        # conditional redirect to single volumes
 | 
			
		||||
        if self.vpath == "" and not self.ouparam:
 | 
			
		||||
            nread = len(self.rvol)
 | 
			
		||||
@@ -366,31 +391,6 @@ class HttpCli(object):
 | 
			
		||||
                    self.redirect(vpath, flavor="redirecting to", use302=True)
 | 
			
		||||
                    return True
 | 
			
		||||
 | 
			
		||||
        x = self.asrv.vfs.can_access(self.vpath, self.uname)
 | 
			
		||||
        self.can_read, self.can_write, self.can_move, self.can_delete = x
 | 
			
		||||
        if not self.can_read and not self.can_write:
 | 
			
		||||
            if self.vpath:
 | 
			
		||||
                self.log("inaccessible: [{}]".format(self.vpath))
 | 
			
		||||
                raise Pebkac(404)
 | 
			
		||||
 | 
			
		||||
            self.uparam = {"h": False}
 | 
			
		||||
 | 
			
		||||
        if "delete" in self.uparam:
 | 
			
		||||
            return self.handle_rm()
 | 
			
		||||
 | 
			
		||||
        if "move" in self.uparam:
 | 
			
		||||
            return self.handle_mv()
 | 
			
		||||
 | 
			
		||||
        if "scan" in self.uparam:
 | 
			
		||||
            return self.scanvol()
 | 
			
		||||
 | 
			
		||||
        if not self.vpath:
 | 
			
		||||
            if "h" in self.uparam:
 | 
			
		||||
                return self.tx_mounts()
 | 
			
		||||
 | 
			
		||||
            if "ups" in self.uparam:
 | 
			
		||||
                return self.tx_ups()
 | 
			
		||||
 | 
			
		||||
        return self.tx_browser()
 | 
			
		||||
 | 
			
		||||
    def handle_options(self):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user