File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class BaseHandler extends EventEmitter {
4141 * @return {bool|string }
4242 */
4343 getFileIdFromRequest ( req ) {
44- const re = new RegExp ( `${ req . baseUrl || this . store . path } \\/(\\S+)\\/?` ) ; // eslint-disable-line prefer-template
44+ const re = new RegExp ( `${ req . baseUrl || '' } ${ this . store . path } \\/(\\S+)\\/?` ) ; // eslint-disable-line prefer-template
4545 const match = ( req . originalUrl || req . url ) . match ( re ) ;
4646 if ( ! match ) {
4747 return false ;
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class PostHandler extends BaseHandler {
1515 send ( req , res ) {
1616 return this . store . create ( req )
1717 . then ( ( File ) => {
18- const url = `//${ req . headers . host } ${ req . baseUrl || this . store . path } /${ File . id } ` ;
18+ const url = `//${ req . headers . host } ${ req . baseUrl || '' } ${ this . store . path } /${ File . id } ` ;
1919 this . emit ( EVENT_ENDPOINT_CREATED , { url } ) ;
2020 return super . send ( res , 201 , { Location : url } ) ;
2121 } )
You can’t perform that action at this time.
0 commit comments