filter functions based on file size
Bug #782759 reported by
Danielle Foré
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Contractor |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
Some contracts may need to place a restriction on file size due to the services they work with, for example there is a maximum upload size for Facebook and you can't send a 3GB movie through gmail.
In this way, an application needs to be able to tell Contractor how large the target item is so that Contractor can either filter out or make insensitive services that can't take large files.
Related branches
lp://staging/~florian-angermeier/contractor/filter-functions-based-on-file-size
- xapantu (community): Approve
-
Diff: 710 lines (+326/-22)13 files modifiedsrc/Contract.vala (+60/-0)
src/ContractDirectory.vala (+2/-1)
src/ContractFile.vala (+42/-1)
src/ContractKeyFile.vala (+44/-3)
src/ContractMatcher.vala (+59/-4)
src/ContractSorter.vala (+4/-2)
src/ContractSource.vala (+4/-2)
src/DBusService.vala (+95/-1)
src/FileEnumerator.vala (+2/-1)
src/FileService.vala (+4/-2)
src/MimeTypeManager.vala (+4/-2)
src/String.vala (+4/-2)
src/Translations.vala (+2/-1)
Changed in contractor: | |
status: | New → Confirmed |
Changed in contractor: | |
importance: | Undecided → Wishlist |
Changed in contractor: | |
milestone: | none → loki-beta1 |
Changed in contractor: | |
milestone: | loki-beta1 → none |
To post a comment you must log in.
As I am getting my feet wet with development in Vala and elementary I am implementing this feature request. But I have some questions before I can finish it:
The max file size should be a key in the appropriate .contract files right? Like: MaxFileSize=8M
There should be a D-Bus service method like 'get_contracts_ by_mimetype_ and_file_ size' where the MIME type of the file in question and its file size are passed?