@@ -22,7 +22,7 @@ import Parse from 'parse/node';
2222 * @interface
2323 * @memberof module:Adapters
2424 */
25- export interface FilesAdapter {
25+ export class FilesAdapter {
2626 /** Responsible for storing the file in order to be retrieved later by its filename
2727 *
2828 * @param {string } filename - the filename to save
@@ -36,23 +36,29 @@ export interface FilesAdapter {
3636 *
3737 * @return {Promise } a promise that should fail if the storage didn't succeed
3838 */
39- createFile ( filename : string , data , contentType : string , options : Object ) : Promise < any >
39+ createFile ( filename : string , data , contentType : string , options : Object ) : Promise < any > {
40+ return Promise . resolve ( ) ;
41+ }
4042
4143 /** Responsible for deleting the specified file
4244 *
4345 * @param {string } filename - the filename to delete
4446 *
4547 * @return {Promise } a promise that should fail if the deletion didn't succeed
4648 */
47- deleteFile ( filename : string ) : Promise < any >
49+ deleteFile ( filename : string ) : Promise < any > {
50+ return Promise . resolve ( ) ;
51+ }
4852
4953 /** Responsible for retrieving the data of the specified file
5054 *
5155 * @param {string } filename - the name of file to retrieve
5256 *
5357 * @return {Promise } a promise that should pass with the file data or fail on error
5458 */
55- getFileData ( filename : string ) : Promise < any >
59+ getFileData ( filename : string ) : Promise < any > {
60+ return Promise . resolve ( ) ;
61+ }
5662
5763 /** Returns an absolute URL where the file can be accessed
5864 *
@@ -61,7 +67,9 @@ export interface FilesAdapter {
6167 *
6268 * @return {string | Promise<string> } Absolute URL
6369 */
64- getFileLocation ( config : Config , filename : string ) : string | Promise < string >
70+ getFileLocation ( config : Config , filename : string ) : string | Promise < string > {
71+ return Promise . resolve ( ) ;
72+ }
6573
6674 /** Validate a filename for this adapter type
6775 *
@@ -91,6 +99,7 @@ export interface FilesAdapter {
9199 // getMetadata(filename: string): Promise<any> {}
92100}
93101
102+
94103/**
95104 * Simple filename validation
96105 *
0 commit comments