Add file triggers and file meta data (#6344)
* added hint to aggregate * added support for hint in query * added else clause to aggregate * fixed tests * updated tests * Add tests and clean up * added beforeSaveFile and afterSaveFile triggers * Add support for explain * added some validation * added support for metadata and tags * tests? * trying tests * added tests * fixed failing tests * added some docs for fileObject * updated hooks to use Parse.File * added test for already saved file being returned in hook * added beforeDeleteFile and afterDeleteFile hooks * removed contentLength because it's already in the header * added fileSize param to FileTriggerRequest * added support for client side metadata and tags * removed fit test * removed unused import * added loging to file triggers * updated error message * updated error message * fixed tests * fixed typos * Update package.json * fixed failing test * fixed error message * fixed failing tests (hopefully) * TESTS!!! * Update FilesAdapter.js fixed comment * added test for changing file name * updated comments Co-authored-by: Diamond Lewis <findlewis@gmail.com>
This commit is contained in:
@@ -626,7 +626,11 @@ describe('Parse.File testing', () => {
|
||||
}).then(fail, response => {
|
||||
expect(response.status).toBe(400);
|
||||
const body = response.text;
|
||||
expect(body).toEqual('{"code":153,"error":"Could not delete file."}');
|
||||
expect(typeof body).toBe('string');
|
||||
const { code, error } = JSON.parse(body);
|
||||
expect(code).toBe(153);
|
||||
expect(typeof error).toBe('string');
|
||||
expect(error.length).toBeGreaterThan(0);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user