55 Commits (eecc680761ba4a0a4830c65121e88d067005958b)

Author SHA1 Message Date
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) 9 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
Julian Lam 4f913d3f19 fixed issue with missing base in path.format 9 years ago
Julian Lam 5858d914bf closes #4550 9 years ago
barisusakli 7ab55b0e95 closes #4392 9 years ago
barisusakli c50d655922 closes #4325 9 years ago
barisusakli cf00371892 closes #4295 9 years ago
Julian Lam 119930131d fixed errors when uploading files 9 years ago
barisusakli 59c350e63c closes #4019 9 years ago
barisusakli 3ea453e8a0 closes #4006 9 years ago
Julian Lam 1660e13aed #3695 9 years ago
barisusakli 99d64db9e0 closes #4011
allow both `.png` and `png`
9 years ago
Julian Lam 37b13b4879 Re-added file extension restriction ACP option
Closes #3918
9 years ago
Julian Lam dbe5b963bd fixes #3863 :trollface: 10 years ago
Julian Lam 051a8e22df Removed allowedFileExtensions meta config
Now, when NodeBB needs to determine file compatibility, jimp
will attempt to open the file for reading. If it fails, file is
considered to be of an invalid type.
10 years ago
barisusakli 323cc165b6 closes #3851
dont use post file upload for cover uploads
check cover upload file size against new setting
store cover uploads in profile folder
use `uid-profilecover` filename for cover uploads
10 years ago
psychobunny f19043d046 profile cover photos 10 years ago
Julian Lam ebed9d641c Add new ACP option to upload Touch Icon, #3668
Also added a number of fixes for mobile enhancements, such
as serving a manifest.json file for Android devices, and
serving proper link tags for all uploaded touch icons.

This commit also creates a new template helper for link tags.
10 years ago
barisusakli cf193581e4 check and log all fs.unlink errors 10 years ago
Barış Soner Uşaklı 3f92984be2 fix image url in relative_path install in post 10 years ago