Commit Graph

48 Commits

Author SHA1 Message Date
Diana Lau 5668fe31f4 chore: update copyright year 2020-02-10 13:57:12 -05:00
Diego A. Zapata Häntsch 9205c9f079 Rannig from other paths. Property files to array. 2019-07-20 01:27:37 -03:00
Agnes Lin 6f8e4284f5 chore: update copyrights years 2019-05-07 09:41:29 -04:00
Matteo Padovano 83a28273d4 add support to promise 2019-01-12 00:23:37 +01:00
Cory Gottschalk db669b1543 added missing tests
Added 2 tests to validate the error responses when a file is not found
2018-06-14 15:19:53 -07:00
Taranveer Virk 1854769986 chore: update node support and versions 2018-06-14 15:42:15 -04:00
Raymond Feng 47d555798c Declare container parameter for swagger spec
Without this change, generated Swagger spec for the upload operation
does not have `container` parameter even it's a variable on the path.
As a result, the sepc fails validations.

An optional `container` is added to the remote method. Conditional
check is added to ensure backward compatibility.
2017-08-30 13:45:19 -07:00
Raymond Feng 636692a8a5 Update deps 2017-03-09 08:22:03 -08:00
Raymond Feng 2cea6a0c8d Merge branch 'master' of https://github.com/hgouveia/loopback-component-storage into hgouveia-master
# Conflicts:
#	lib/storage-handler.js
#	test/upload-download.test.js
2017-03-01 15:32:11 -08:00
Raymond Feng 0f521a1c2d Merge pull request #186 from jeffora/fix-error-handling
Fix #185: Validation failures crash server
2017-03-01 15:20:33 -08:00
Loay b6d837ad1a Fix insert of finalNewLine 2017-02-15 11:08:38 -05:00
Loay c6978261c7 Fix path joining/expanding 2017-02-10 16:26:30 -05:00
Jeff Burn 99fdb64d1e Fix #185: Validation failures crash server
Fixes issue where upload and download methods in FileSystemProvider
cause crashes in downstream methods by not returning streams in error
scenarios

- Add streamError, readStreamError, writeStreamError helper function
- Wrap all returns from upload / download methods in streams
- Fix incorrect format string
- Add new unit tests
2016-12-21 09:27:40 +11:00
Miroslav Bajtoš 6cb5a294c5 Continue middleware chain after download error
Stop sending constructing the error response directly inside the
storage component and send the error back to the application to handle
it.

As a result:

 - `File.afterRemoteError` hook is trigered now

 - App-provided error handling strategy is used to build error
   responses, e.g. using the production mode of strong-error-handler
   to hide sensitive information.
2016-11-10 15:58:39 -05:00
Loay f944fa2fd7 Return error when no file is uploaded 2016-11-09 16:01:36 -05:00
Loay 0931e9da83 Upgrade loopback to 3.0.0 2016-10-24 11:36:46 -04:00
Amir Jafarian 4c2751a2a4 Fix linting errors 2016-10-19 11:36:39 -04:00
Amir Jafarian 7900d48126 Auto-update by eslint --fix 2016-10-18 18:06:55 -04:00
Richard Pringle 70e420bcbe Add keep-alive setting to wrong content type test. 2016-09-29 15:20:29 -04:00
Jose De Gouveia efe4e089f6 added file field name into getFilename function 2016-09-07 17:46:43 +02:00
Richard Pringle 20d9aaadf2 Continue middleware chain after download. 2016-08-16 16:28:47 -04:00
Richard Pringle 635fc33823 Add test for beforeRemote hook on download. 2016-08-16 16:00:05 -04:00
Richard Pringle 4da51eb43d Use ephemeral port in upload/download test. 2016-08-10 13:34:00 -04:00
David Cheung 222051a385 Fix windows upload test double callback issue
See visionmedia/supertest/issues/230#issuecomment-103226606
2016-08-03 17:07:11 -04:00
Ryan Graham 728a1986df
update/insert copyright notices 2016-05-03 16:18:18 -07:00
Simon Ho 8eaf78b912 Migrate examples
- Move example dirs to loopback-example-storage
- Refactor tests to depend on local files in test/fixtures
- Add link to example in README.md
2016-02-02 17:05:12 -08:00
Santiago Osorio 8eaf9f54a0 Expose `originalFilename` property
Filename is replaced when `getFilename` is set in the options, this commit sets a new property called `originalFilename` to keep the original filename (only works when you upload the file, after that you need to save it in a model).
2016-01-06 10:36:36 -06:00
Raymond Feng ea7202a8fa Fix the test case 2015-09-29 20:46:17 -07:00
ningsuhen f220141419 Fix for issues - #58, #23 & #67 2015-06-01 13:25:04 +05:30
Raymond Feng dcc233c0ab Fix the tests 2015-04-21 13:02:47 -07:00
Benjamin Boudreau 95baaff716 Adding support for ACL, Content-Type, Max File Size and allowd Content-Types 2015-02-10 09:26:14 -05:00
Benjamin Boudreau ec4000745a Adding key renaming support on Service.upload and Handler.upload 2015-01-30 14:30:35 -05:00
Raymond Feng f9d9fe4061 Fix the metadata interception 2014-03-31 16:30:35 -07:00
Raymond Feng 73474ce67a Add metadata assertions for REST json responses 2014-03-31 09:49:42 -07:00
Raymond Feng c00b48cc6f Filter out senstive information from files 2014-03-28 22:07:46 -07:00
Raymond Feng a5da7fc9f0 Separate the metadata in Container/File class 2014-03-28 17:55:01 -07:00
Raymond Feng 9c0885aa07 Fix remoting for container/file apis 2014-02-03 10:58:37 -08:00
Raymond Feng eb0d9a11bf Set Content-Type based on the file path 2014-01-29 22:39:01 -08:00
Raymond Feng 70f5d6dc35 Reformat code 2014-01-24 09:44:58 -08:00
Raymond Feng 9c58011530 Clean up the download method 2014-01-14 10:26:09 -08:00
Raymond Feng 13e9097ff0 Refactor the storage service 2014-01-10 11:34:37 -08:00
Raymond Feng 18b27ff320 Fix for https://strongloop.atlassian.net/browse/SLA-316 2013-07-24 12:07:46 -07:00
Raymond Feng 14af972336 Add Container/File classes 2013-06-25 09:29:53 -07:00
Raymond Feng 26f619fb63 Add two more tests 2013-06-24 16:19:06 -07:00
Raymond Feng 8eab9b5614 Enhance the test case 2013-06-24 16:05:25 -07:00
Raymond Feng e53f369cfc Add .gitignore 2013-06-24 15:54:11 -07:00
Raymond Feng 8e3c3edeeb Add more test cases 2013-06-24 15:53:14 -07:00
Raymond Feng 5b3d431488 Initial commits 2013-06-24 14:07:12 -07:00