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:
@@ -31,10 +31,19 @@ export class FilesAdapter {
|
||||
* @param {*} data - the buffer of data from the file
|
||||
* @param {string} contentType - the supposed contentType
|
||||
* @discussion the contentType can be undefined if the controller was not able to determine it
|
||||
* @param {object} options - (Optional) options to be passed to file adapter (S3 File Adapter Only)
|
||||
* - tags: object containing key value pairs that will be stored with file
|
||||
* - metadata: object containing key value pairs that will be sotred with file (https://docs.aws.amazon.com/AmazonS3/latest/user-guide/add-object-metadata.html)
|
||||
* @discussion options are not supported by all file adapters. Check the your adapter's documentation for compatibility
|
||||
*
|
||||
* @return {Promise} a promise that should fail if the storage didn't succeed
|
||||
*/
|
||||
createFile(filename: string, data, contentType: string): Promise {}
|
||||
createFile(
|
||||
filename: string,
|
||||
data,
|
||||
contentType: string,
|
||||
options: Object
|
||||
): Promise {}
|
||||
|
||||
/** Responsible for deleting the specified file
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user