uploader with progress bar. reown log file
This commit is contained in:
11
code/app.py
11
code/app.py
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os,sys,time,stat
|
||||
import os, sys, time
|
||||
import json
|
||||
from datetime import datetime
|
||||
from flask import Flask, render_template, jsonify, current_app, Response, \
|
||||
@@ -883,15 +883,6 @@ def secure_filename_hidden(filename):
|
||||
return secure
|
||||
|
||||
|
||||
def set_rights(path):
|
||||
os.chown(path, app.config['UID'], app.config['GID'])
|
||||
st = os.stat(path)
|
||||
if app.config['UID'] > 0:
|
||||
os.chmod(path, st.st_mode | stat.S_IRUSR | stat.S_IWUSR)
|
||||
if app.config['GID'] > 0:
|
||||
os.chmod(path, st.st_mode | stat.S_IRGRP | stat.S_IWGRP)
|
||||
|
||||
|
||||
def zip_share(share):
|
||||
if not os.path.exists(app.config['ZIP_FOLDER']):
|
||||
os.makedirs(app.config['ZIP_FOLDER'])
|
||||
|
||||
Reference in New Issue
Block a user