Feature/files in forms 160#273
Open
adam-sas-on wants to merge 17 commits into
Open
Conversation
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)
…e(s) with confirmation on modal; #160
…re/files_in_forms_160
Use XMLHttpRequest to make possible to use progress
- Opening - Removing - Uploading Include showing progress (simplified version)
…re/files_in_forms_160
…oading synchronization
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 migrateRemarks
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 ofaddNewFiles()).This
mergeis todevbranch, 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.