73 Commits (5c0266d8c4a33e9069d53eb1768f681231cbae8d)

Author SHA1 Message Date
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 6 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
6 years ago
Barış Soner Uşaklı 26d4e0852f use includes instead of indexOf
use _.uniq instead of filter&indexOf
6 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 7 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
Peter Jaszkowiak a038c66549 ESlint quotes 8 years ago
Peter Jaszkowiak 52f2028206 ESlint no-multiple-empty-lines 8 years ago
Peter Jaszkowiak bc1d70c126 ESlint comma-dangle 8 years ago
pichalite 7f4e4c8e2e Fix styling 8 years ago
pichalite 4d755bad0c Use typeToExtension from file.js 8 years ago
barisusakli 51981ffb99 get extention from content type 8 years ago
Anil Mandepudi 619ca48403 remove shims for IE8 (#5157) 8 years ago
HeeL 4a3c31b2dc Fix space-before-function-paren linter rule 9 years ago
barisusakli aac0313f2e closes #4917 9 years ago
pichalite 2cd709418b fix resizeImage on upload 9 years ago
barisusakli d2cbd7e6dc new priv for uploads 9 years ago
barisusakli 630dd66cf6 closes #4645 9 years ago
barisusakli acc030e6da added filter:image.size
fix uploading of gifs if imagemagick plugin is installed but no image
upload plugins are present.
9 years ago
barisusakli 9b54ce7235 fix uploads with no extensions 9 years ago
barisusakli fea18a050f closes #4590 9 years ago
barisusakli e9d548d057 closes #4580 removed path.parse 9 years ago
pichalite f154853b39 add extension after filename trim 9 years ago
pichalite 821d723541 fix image upload in post 9 years ago