91 Commits (7ef5214ef912bb9bd0eaead458d115ff497e3a84)

Author SHA1 Message Date
Peter Jaszkowiak cc9d6fd08b chore: eslint max-len 4 years ago
Peter Jaszkowiak b56d9e12b5 chore: eslint prefer-arrow-callback 4 years ago
Peter Jaszkowiak 707b55b6a5 chore: eslint prefer-template 4 years ago
Julian Lam 84dfdfe659 chore: remove deprecated v2 style responses for thumbs upload route [breaking] 4 years ago
Julian Lam b742229e59 fix: #9169, re-adding v2-style behaviour so as to not break the API... yet 4 years ago
Barış Soner Uşaklı 8f938eba19 fix: #9074, fix svg uploads 4 years ago
Julian Lam 67cf5e83b7 fix: changes to thumb resizing logic
- Resized thumb no longer skews aspect ratio
- Thumbs resized down to maximum thumb size by WIDTH only
- image.checkDimensions() now returns dimensions
4 years ago
Julian Lam c043cfebd6 fix: added back missing topic thumb tests that were removed in last commit 4 years ago
Julian Lam 340387c18a fix: #9055, non-standard API response from addThumbs route
Also removed old thumb upload router handler, and updated uploadPost handling in composer to match new response schema
4 years ago
Julian Lam 5950683316 feat: closes #9048, tests for topic thumbs routes, write API schema 4 years ago
Julian Lam 98cd9e3549 feat: allow uploadThumb controller to be called in code
it, and uploadsController.upload() now return the results of their operation
4 years ago
Barış Soner Uşaklı 9ee1fb490e fix: https://github.com/NodeBB/NodeBB/pull/8759 4 years ago
Julian Lam 6e2da9966e refactor: move plugin hook methods to plugin.hooks.* 4 years ago
Peter Jaszkowiak 55d5cccf2e
Document deprecations and remove old ones (#8706)
* chore: document deprecation removal versions

* chore: remove deprecations 2+ versions old
5 years ago
Barış Soner Uşaklı 37e56d94ce feat: series upload 5 years ago
Barış Soner Uşaklı 7f24200c73 feat: add folder to filter:uploadImage and filter:uploadFile 5 years ago
Julian Lam 6f504c4142
Remove allowFileUploads ACP option (#8324)
* feat: allow awaitable upgrade scripts

* feat: allowFileUploads removal upgrade script

* refactor: remove unnecessary ACP option `allowFileUploads`

* fix: updated upgrade script template to not use callback arg

* fix: upgrade script as per @baris

* fix: add missing await

* fix: add missing await
5 years ago
Barış Soner Uşaklı ffe3670ff5 feat: deprecate file.isFileTypeAllowed
use image.isFileTypeAllowed, this function was always meant for images
6 years ago
Barış Soner Uşaklı 5c0266d8c4 refactor: async/await uploads 6 years ago
Barış Soner Uşaklı 5eaa14e746 fix: strip exif data on image uploads 6 years ago
Barış Soner Uşaklı 7e828404f6 fix: #7116
dont save relative_path in db for group covers
6 years ago
Barış Soner Uşaklı 9c03881d5a add threshold for image resizing 7 years ago
Barış Soner Uşaklı 9c022afae1
Parse int (#6853)
* Store config fields as JSON in the db

Fewer parseInts

* Remove unnecessary parseInts

* remove some dupe code add tests

* remove console.log

* remove more parseInts

* WIP: read meta.configs defaults from defaults.json

remove more parseInts

* more work

* add log for failing test

* update admin pwd

* fix tests, dont require posts/cache before configs are initialized

* handle saves

* Test boolean conditions

* remove more parseInts

* Fix boolean values

* remove lots more parseInts

* removed json parsing

* renamed var to number

* categories dont have timestamp
7 years ago
Barış Soner Uşaklı 26d4e0852f use includes instead of indexOf
use _.uniq instead of filter&indexOf
7 years ago
Barış Soner Uşaklı 59b988a205 change test so it checks url 7 years ago
Barış Soner Uşaklı b7ead6dc9c
Replace jimp with sharp (#6774)
* add probe image size and max image size

* replace jimp and image-probe with sharp

* better name for test

* resize with just path

* resize thumb inplace

* use filename
7 years ago
Julian Lam d1fd07f42f remove console.log, #6486 7 years ago
Julian Lam 18bde866ff Append file name to the JSON payload returned
... during file upload process... closes #6486
7 years ago
Barış Soner Uşaklı 5d2a7106f6 change upload storage 7 years ago
Barış Soner Uşaklı 04979f86a8 delete users uploads on account delete
store uid:<uid>:uploads
7 years ago
Barış Soner Uşaklı dcb6af5768 closes #6373 7 years ago
Baris Usakli 1c24c34d04 add missing comma 7 years ago
Baris Usakli d25eb674c6 make climate happy 7 years ago
Julian Lam a8ec6a4a9c patching accidental leakage of full path of uploaded file when uploading pictures or attachments 7 years ago
Barış Soner Uşaklı ff6c6a54c1 make upload permissions global
give upload image permission to registered users on install
add global privileges to app.user.privileges for client side use
7 years ago
Barış Soner Uşaklı 6a2019c646 closes #6003 8 years ago
Barış Soner Uşaklı eecc680761 style 8 years ago
dbolack-ab c1452db0ba Adds the filter:uploadStored hook which fires after the file is saved… (#5798)
* Adds the filter:uploadStored hook which fires after the file is saved in the async waterfall and passes:
                       var storedFile = {
                       url: nconf.get('relative_path') + upload.url,
                       path: upload.path,
                       name: uploadedFile.name,
               }
               plugins.fireHook( 'filter:uploadStored', { uploadedFile: uploadedFile, storedFile: storedFile } );

* Corrections per PR. Should match style guide.

* Correction attempts take 2.

Per:

/home/travis/build/NodeBB/NodeBB/src/controllers/uploads.js

  234:5    error  Missing semicolon                            semi

  235:3    error  Expected indentation of 3 tabs but found 2   indent

  235:19   error  There should be no spaces inside this paren  space-in-parens

  235:105  error  There should be no spaces inside this paren  space-in-parens

  236:3    error  Expected indentation of 3 tabs but found 2   indent

* next() shouldn't fire twice, but I see no documentation suggesting that the paramaters will fire correctly.

Previous comments imply it is preferred to have fireHook fire fof the callback rather than having it happen next,  so I'm wrapping next in an anonymous function to ensure it passes the parameters.

If this is not the preferred method, please provide a thorough correction.

* Meh. Figuring out this style requirement is so hit and miss.

* Corrected for proper callback? technique.

Might blow up on style. Will watch.
8 years ago
Ben Lubar 07982a3fa2
Fix uploading a file with no extension resulting in invalid-extension even if the file extension list is blank (allow all) 8 years ago
Barış Soner Uşaklı c9d502320f file.delete method 8 years ago
Ben Lubar 572d7a1e8c Fix uploads of files with no extension failing when there is no restriction on file extensions. 8 years ago
Barış Soner Uşaklı 13a04123e0 closes #5641 8 years ago
barisusakli e63559b6fd closes #5484 8 years ago
barisusakli b7e6104bbc closes #5511 8 years ago
barisusakli bce1208e2f make uploadFile public 8 years ago
Julian Lam e71bd7a27f Merge branch 'master' into styleguide 8 years ago
barisusakli 04b07e292c thumb tests 8 years ago
Peter Jaszkowiak 23540afaeb Resolve merge conflicts 8 years ago
Peter Jaszkowiak 896c8c7343 ESlint object-curly-spacing 8 years ago
Peter Jaszkowiak 3b0dd2d1ef ESlint padded-blocks 8 years ago