Commit Graph

61 Commits

Author SHA1 Message Date
Barış Soner Uşaklı
dcb6af5768 closes #6373 2018-03-19 16:24:22 -04:00
Baris Usakli
1c24c34d04 add missing comma 2018-02-26 16:05:12 -05:00
Baris Usakli
d25eb674c6 make climate happy 2018-02-26 15:54:17 -05:00
Julian Lam
a8ec6a4a9c patching accidental leakage of full path of uploaded file when uploading pictures or attachments 2018-02-26 15:40:19 -05:00
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
2018-01-03 13:27:34 -05:00
Barış Soner Uşaklı
6a2019c646 closes #6003 2017-10-23 19:05:00 -04:00
Barış Soner Uşaklı
eecc680761 style 2017-07-17 18:16:23 -04:00
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.
2017-07-17 18:15:24 -04:00
Ben Lubar
07982a3fa2 Fix uploading a file with no extension resulting in invalid-extension even if the file extension list is blank (allow all) 2017-06-16 10:37:23 -05:00
Barış Soner Uşaklı
c9d502320f file.delete method 2017-05-24 00:02:30 -04:00
Ben Lubar
572d7a1e8c Fix uploads of files with no extension failing when there is no restriction on file extensions. 2017-05-11 11:25:13 -05:00
Barış Soner Uşaklı
13a04123e0 closes #5641 2017-05-01 20:58:34 -04:00
barisusakli
e63559b6fd closes #5484 2017-04-14 12:59:36 -04:00
barisusakli
b7e6104bbc closes #5511 2017-03-07 15:59:50 +03:00
barisusakli
bce1208e2f make uploadFile public 2017-03-02 20:51:03 +03:00
Julian Lam
e71bd7a27f Merge branch 'master' into styleguide 2017-02-24 11:45:04 -05:00
barisusakli
04b07e292c thumb tests 2017-02-24 17:34:34 +03:00
Peter Jaszkowiak
23540afaeb Resolve merge conflicts 2017-02-18 19:14:39 -07:00
Peter Jaszkowiak
896c8c7343 ESlint object-curly-spacing 2017-02-18 12:30:49 -07:00
Peter Jaszkowiak
3b0dd2d1ef ESlint padded-blocks 2017-02-18 02:32:24 -07:00
Peter Jaszkowiak
a038c66549 ESlint quotes 2017-02-18 01:56:23 -07:00
Peter Jaszkowiak
52f2028206 ESlint no-multiple-empty-lines 2017-02-17 22:08:23 -07:00
Peter Jaszkowiak
bc1d70c126 ESlint comma-dangle 2017-02-17 19:31:21 -07:00
pichalite
7f4e4c8e2e Fix styling 2017-02-17 20:02:26 +00:00
pichalite
4d755bad0c Use typeToExtension from file.js 2017-02-17 19:57:18 +00:00
barisusakli
51981ffb99 get extention from content type 2017-01-31 22:18:22 +03:00
Anil Mandepudi
619ca48403 remove shims for IE8 (#5157) 2016-10-26 14:36:26 -04:00
HeeL
4a3c31b2dc Fix space-before-function-paren linter rule 2016-10-13 11:43:39 +02:00
barisusakli
aac0313f2e closes #4917 2016-08-08 13:21:05 +03:00
pichalite
2cd709418b fix resizeImage on upload 2016-07-19 03:06:33 +00:00
barisusakli
d2cbd7e6dc new priv for uploads 2016-07-12 19:59:04 +03:00
barisusakli
630dd66cf6 closes #4645 2016-05-15 21:18:05 +03:00
barisusakli
acc030e6da added filter:image.size
fix uploading of gifs if imagemagick plugin is installed but no image
upload plugins are present.
2016-05-09 22:25:56 +03:00
barisusakli
9b54ce7235 fix uploads with no extensions 2016-05-03 16:14:52 +03:00
barisusakli
fea18a050f closes #4590 2016-05-01 12:44:43 +03:00
barisusakli
e9d548d057 closes #4580 removed path.parse 2016-05-01 12:26:57 +03:00
pichalite
f154853b39 add extension after filename trim 2016-04-27 14:46:03 +00:00
pichalite
821d723541 fix image upload in post 2016-04-26 23:22:19 +00:00
Julian Lam
4f913d3f19 fixed issue with missing base in path.format 2016-04-20 14:15:38 -04:00
Julian Lam
5858d914bf closes #4550 2016-04-20 13:58:31 -04:00
barisusakli
7ab55b0e95 closes #4392 2016-03-23 12:19:29 +02:00
barisusakli
c50d655922 closes #4325 2016-03-08 19:01:45 +02:00
barisusakli
cf00371892 closes #4295 2016-03-02 16:04:16 +02:00
Julian Lam
119930131d fixed errors when uploading files 2016-02-10 15:23:56 -05:00
barisusakli
59c350e63c closes #4019 2016-01-11 19:15:43 +02:00
barisusakli
3ea453e8a0 closes #4006 2016-01-11 10:27:39 +02:00
Julian Lam
1660e13aed #3695 2015-12-31 11:36:28 -05:00
barisusakli
99d64db9e0 closes #4011
allow both `.png` and `png`
2015-12-28 15:38:02 +02:00
Julian Lam
37b13b4879 Re-added file extension restriction ACP option
Closes #3918
2015-12-14 14:57:19 -05:00
Julian Lam
dbe5b963bd fixes #3863 :trollface: 2015-11-11 13:52:29 -05:00