An open API service indexing awesome lists of open source software.

https://github.com/aasmpro/djangosmartshare

a simple django app for sharing files over http
https://github.com/aasmpro/djangosmartshare

django file-manager file-sharing hacktoberfest python3

Last synced: about 1 year ago
JSON representation

a simple django app for sharing files over http

Awesome Lists containing this project

README

          

# django smart share
simple django app for sharing files over http / https.

![DirectoryAsAdmin2.png](screenshots/DirectoryAsAdmin2.png)

more [screenshots](screenshots/screenshots.md)

## Requirements
* python >= 3.5
* django >= 2

## Installation
install using `pip`:
```
pip install djangosmartshare
```
adding `smartshare` to `INSTALLED_APPS` in `settings.py`:
```python
INSTALLED_APPS = [
...,
'smartshare',
...,
]
```
including `smartshare.urls` in your project `urls.py`:
```python
from django.urls import path, include

urlpatterns = [
...,
path('', include('smartshare.urls')),
...,
]
```
running `migrate` for making related database tables:
```
python3 manage.py migrate
```

## Features
you can simply share any directory on your local system over http / https, in short : just like a file browser.

in `Location` model, by adding a new location, system will check if the path exist, so you can have following permissions separated for 3 different user types per each **Location** object. **Admins** , **Users** ( mean normal users ) and **Anonymouse Visitors** ( public ) :

> attention :
> 1. if you share a directory, inside another shared directory, neither **Base Directory** nor **Sub Directory** will not change each other permissions. the deepest available **Sub Directory** Location object permissions will be used for each directory.
> 2. the root path **`/`** is not available.
> 3. only directories path are allowed to be shared, not files.
> 4. commands will run as logged-in user on local system, so even if a permission like **Can Delete** be **True**, on a directory that need superuser **sudo** permission, the command will not effect, for security reasons.

permission | description
------------|------------
Active | wheather to show this directory for the allowed user or not.
Show Files | user can view Files in directory. ( only view, nothing more )
Show Directories | user can view Directories in directory.
Show Hidden Files | same as Files, fore Hidden Files.
Show Hidden Directories | same as Directories, for Hidden Directories
Can Download | if this permission be `True`, user can download shared directory and it's subdirectories in compressed files as **zip**, **tar**, **tar.gz** and **tar.bz2**. an also user allowed to download any Files in directory and it's subdirectories.
Can Upload | if this permission be `True`, user can upload Files in directory and it's subdirectories.
Can Delete | if this permission be `True`, a **Delete** button will be showed for each subdirectories and files in directory, so user can delete them.
Can Create | if this permission be `True`, an **Add** button will be showed for Directories and Files, so user can add new directory, or a file with it's content.

this app have a simple responsive front-end design, created using **Bootstrap 4** framework.

## TO DO
this Features are planned to be added in next version :
- [ ] adding **Run Command** ability.
- [ ] adding **Copy** and **Move**.
- [ ] adding **multi upload**.
- [ ] adding **multi selecting** files and directories ability for Download or Delete.
- [ ] adding **Preview** and **Edit** abilities.
- [ ] adding **permissions** for duplicated files and directories while adding or uploading.
- [ ] changing **dirs.html** template for adding **Upload**, **Delete**, **Add** forms.
- [ ] rewriting **views** definitions.
- [ ] rewriting responsive template for a better UX / UI.

## Contribution
any contributions are warmly accepted! even if you have any idea about enhancing this project, i'd be glad to hear from you.