summaryrefslogtreecommitdiffstats
path: root/application/controllers/file.php
AgeCommit message (Collapse)AuthorFilesLines
2015-05-22Fix incorrect EXIF orientation on thumbnail history0.9.1Florian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-05-21\c\file::clean_stale_files: Increase robustnessFlorian Pritz1-3/+7
Delete files not matching our pattern and be forgiving if directories are cleaned up by mfile->delete_data_id. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-05-21Support multiple files with the same hashFlorian Pritz1-34/+42
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-05-02Get supported image types from driversFlorian Pritz1-2/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-25API 1.3.0: Allow multipaste creation for basic accessFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-09Improve title for multipastesFlorian Pritz1-1/+36
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-01file/do_websubmit: throw exception rather than assertFlorian Pritz1-2/+3
An assert is actually wrong for user input. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-01Refactor lexer code into dedicated classFlorian Pritz1-7/+9
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-03-08Unify file/cron and mfile->valid_idFlorian Pritz1-24/+19
Create a testable function doing all the verification/removal, add tests and use it for both cases. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-03-02Add imagemagick supportFlorian Pritz1-17/+33
Adds additional support for imagemagick if GD doesn't support a file type and extends the files displayed as thumbnails to all images and pdf files. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-23upload_form: Support multiple textareas/files at the same timeFlorian Pritz1-28/+83
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-22s\files: rename add_file to add_uploaded_fileFlorian Pritz1-1/+1
It doesn't add any file so it should have that name. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-19Add claiming of multipastesFlorian Pritz1-5/+6
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-15c/f/do_upload: simpilfy multipaste creationFlorian Pritz1-12/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-03lib/Image->get: check if ob_get_clean workedFlorian Pritz1-5/+0
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-03Use exceptions instead of show_errorFlorian Pritz1-10/+12
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-03api: implement file/create_multipasteFlorian Pritz1-46/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-03api: implement file/deleteFlorian Pritz1-47/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-03Remove unstable json apiFlorian Pritz1-20/+0
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-03Rework error handling in upload validatorFlorian Pritz1-13/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-16fix multipaste in service/historyFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-16Fix error in file/upload_historyFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-16Improve history api for multipastesFlorian Pritz1-0/+16
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-16first go at reworking; needs to be redesignedFlorian Pritz1-76/+16
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-11-03Ignore special dir in clean_stale_filesFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-11-02Add tarball support to multipastesFlorian Pritz1-0/+76
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-10-19Clean up the postgres changesFlorian Pritz1-1/+1
Style cleanup and some regression fixes Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-10-10Merge remote-tracking branch 'rafi/master' into rafiFlorian Pritz1-32/+35
2014-10-03Support EXIF orientation in colorboxFlorian Pritz1-0/+2
This also reindents colorbox.css. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-10-03Rework image manipulation classFlorian Pritz1-3/+3
This is the first of hopefully more classes using namespaces and proper classes that can be used as objects rather than CI's singleton approach. The namespace is mainly used to gain nice autoloading capabilities and it's not really yet used for separation. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-10-03Move thumbnail code to dedicated classFlorian Pritz1-4/+6
This also moves the code from mfile->image_dimension() to the only place where it was called. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-09-28file/cron: Protecting identifiersRafael Bodill1-1/+2
2014-09-19where_in for in array queries a proper count usageRafael Bodill1-1/+1
2014-09-19Correct unsupported open/close where query statementsRafael Bodill1-3/+1
2014-09-19File controller uses query builder, except 2 queriesRafael Bodill1-32/+36
2014-08-29Set title on code render pageFlorian Pritz1-0/+2
This got lost in the multipaste change. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-08-29add multipaste supportFlorian Pritz1-139/+367
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-07-23Move migration code to CLI callable functionFlorian Pritz1-10/+2
This is necessary to prevent migrations from running multiple times in parallel. A git hook can be used to run this after checkout so impact should be fairly low. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-02-21Implement multiple access levels for api keysFlorian Pritz1-2/+2
This allows to use an api key to write a completly standalone client. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-02-15Work around PHP 5.3 limitationFlorian Pritz1-3/+5
$this in anonymous functions is only supported in PHP >= 5.4 Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-11-09use cache_function() everywhereFlorian Pritz1-15/+13
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-11-09cache file/thumbnail responsesFlorian Pritz1-5/+13
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-10-22Update CSP header; change order to fix svg display in firefoxFlorian Pritz1-1/+1
Apparently firefox doesn't like "style-src * 'unsafe-inline'", but wants "style-src 'unsafe-inline' *" otherwise it doesn't honor 'unsafe-inline'. In chromium both behave the same. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-10-06Fix display error when redering markdownLukas Epple1-2/+4
Initial-patch-by: Lukas Epple <lukas.epple@me.com> Switch from <table> to <div> like we did for pygments. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-09-25Remove chmod on uploaded filesFlorian Pritz1-2/+0
It interferes with multiuser setups if you use X-Sendfile and it isn't really needed anyway because you can set an upload_path outside the docroot and because the default path is protected by an .htaccess file. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-09-23Implement rangeDownload() as driver and provide sendfile implementations for ↵Pierre Schmitz1-2/+4
Nginx and Lighttpd * The rangeDownload() function has been moved to libraries/Ddownload/drivers/Ddownload_php.php * The nginx and lighttpd drivers can be set via $config['download_driver'] Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-09-22Move user_logged_in check to controller constructorFlorian Pritz1-1/+0
TL;DR: Allows us to show a proper error page if encryption_key is missing from the config. muser->logged_in() can load the session class which will die if encryption_key is not set in the config causing an error to be displayed. Because the header is also loaded when we display an error loading the class will be tried again. CI maintains an array with information which classes have been tried to be loaded and will simply return true without loading again. muser->logged_in() will then try to access $this->session which doesn't exist. Since all of this happens when we are already in the header the error message appears in the navigation being hard to read. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-09-04Replace is_cli_client() with stateful_client where applicableFlorian Pritz1-4/+4
Stateless clients (cli client and clients using api keys) can't reclaim IDs (no cookie) so they should be required to log in asap and they will always get an error if they didn't log in. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-09-04Generalize request_type() to static_storage()Florian Pritz1-3/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-09-02claim_id: Fix error when called directly without last_upload dataFlorian Pritz1-0/+7
Signed-off-by: Florian Pritz <bluewind@xinu.at>