Skip to content

Feature/files in forms 160#273

Open
adam-sas-on wants to merge 17 commits into
devfrom
feature/files_in_forms_160
Open

Feature/files in forms 160#273
adam-sas-on wants to merge 17 commits into
devfrom
feature/files_in_forms_160

Conversation

@adam-sas-on
Copy link
Copy Markdown
Member

After this merge user will have an option to upload files for every page of packages.
For a situation when filenames duplicate, backend changes name and keeps original name in database.

It will be necessary to do a migration of database: python manage.py migrate

Preview of the list of files in a form

Remarks
A limit of the sum of file-sizes is not implemented yet.
Error function for a case when file can not be updated is also a todo-feature (function(){} part of addNewFiles()).
This merge is to dev branch, so main frontend branch will have to be update also.

This branch might not be to removed because there is a plan to change style ot the list of files.

Page can have many files (many-to-one)
When file is uploaded, white-list is taken into account but it checks extension only (no content type yet)
Model stores:
- a file
- original name of file
- size of file (to be in use when sum of sizes will be limited for each companies)
- description for further information for user
- corresponding page and company
DB can store many files with the same name,
so this change enables downloading file with original type of the content
…ading

Raw downloading is for cases when files have originally the same name but another on the server
Apply python's "It's easier to ask for forgiveness than permission" (EAFP)
Use XMLHttpRequest to make possible to use progress
- Opening
- Removing
- Uploading
Include showing progress (simplified version)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant