-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from spaun299/connect_file_manager_upload
Connect file manager upload
- Loading branch information
Showing
55 changed files
with
134 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,6 @@ Virtualenviroment/ | |
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import os | ||
from time import gmtime, strftime | ||
from stat import * | ||
from flask import jsonify, request, Blueprint | ||
|
||
files = os.listdir('/home/viktor/Downloads') | ||
static_bp = Blueprint('static', __name__) | ||
|
||
@static_bp.route('/filemanager/bridges/python/ctrl_filemanager.py', methods=['GET', 'POST']) | ||
def ctrl_filemanager(): | ||
for params in request.json.values(): | ||
if params['mode'] == 'list': | ||
print(listing()) | ||
return jsonify(listing()) | ||
|
||
|
||
|
||
def listing(): | ||
|
||
info = [] | ||
for file in files: | ||
st = os.stat('/home/viktor/Downloads/'+file) | ||
params = dict() | ||
params['size'] = st[ST_SIZE] | ||
params['date'] = strftime("%Y-%d-%m %X", gmtime(st[ST_MTIME])) | ||
params['name'] = os.path.basename(file) | ||
params['rights'] = 'drwxr-xr-x' | ||
if os.path.isfile('/home/viktor/Downloads/'+file): | ||
params['type'] = 'file' | ||
else : | ||
params['type'] = 'dir' | ||
info.append(params) | ||
file_list = {"result": info} | ||
return file_list | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
profapp/static/angular-filemanager/bridges/pyhon/ctrl_filemanager.py
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__author__ = 'viktor' |
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
(function(angular) { | ||
"use strict"; | ||
angular.module('FileManagerApp').constant("fileManagerConfig", { | ||
appName: "https://github.com/joni2back/angular-filemanager", | ||
defaultLang: "en", | ||
|
||
listUrl: "/filemanager/bridges/python/ctrl_filemanager.py", | ||
uploadUrl: "/filemanager/bridges/python/ctrl_filemanager.py", | ||
renameUrl: "/filemanager/bridges/python/ctrl_filemanager.py", | ||
copyUrl: "/filemanager/bridges/python/ctrl_filemanager.py", | ||
removeUrl: "/filemanager/bridges/python/ctrl_filemanager.py", | ||
editUrl: "/filemanager/bridges/python/ctrl_filemanager.py", | ||
getContentUrl: "/filemanager/bridges/python/ctrl_filemanager.py", | ||
createFolderUrl: "/filemanager/bridges/python/ctrl_filemanager.py", | ||
downloadFileUrl: "/filemanager/bridges/python/ctrl_filemanager.py", | ||
compressUrl: "/filemanager/bridges/python/ctrl_filemanager.py", | ||
extractUrl: "/filemanager/bridges/python/ctrl_filemanager.py", | ||
permissionsUrl: "/filemanager/bridges/python/ctrl_filemanager.py", | ||
|
||
allowedActions: { | ||
rename: true, | ||
copy: true, | ||
edit: true, | ||
changePermissions: true, | ||
compress: true, | ||
compressChooseName: true, | ||
extract: true, | ||
download: true, | ||
preview: true, | ||
remove: true | ||
}, | ||
|
||
enablePermissionsRecursive: true, | ||
|
||
isEditableFilePattern: '\\.(txt|html|htm|aspx|asp|ini|pl|py|md|php|css|js|log|htaccess|htpasswd|json|sql|xml|xslt|sh|rb|as|bat|cmd|coffee|php[3-6]|java|c|cbl|go|h|scala|vb)$', | ||
isImageFilePattern: '\\.(jpg|jpeg|gif|bmp|png|svg|tiff)$', | ||
isExtractableFilePattern: '\\.(zip|gz|tar|rar|gzip)$' | ||
}); | ||
})(angular); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__author__ = 'viktor' |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__author__ = 'viktor' |
Empty file.
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.