File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -242,12 +242,15 @@ class LDP {
242
242
if ( isOverQuota ) {
243
243
throw error ( 413 , 'User has exceeded their storage quota' )
244
244
}
245
- // Set url using folder/.meta. This is Hack to find folder path
246
- const { path } = await this . resourceMapper . mapUrlToFile ( {
247
- url : container ? ( url . url || url ) + suffixMeta : url ,
245
+ // Set url using folder/.meta
246
+ let { path } = await this . resourceMapper . mapUrlToFile ( {
247
+ url,
248
248
contentType,
249
- createIfNotExists : true
249
+ createIfNotExists : true ,
250
+ searchIndex : false
250
251
} )
252
+
253
+ if ( container ) { path += suffixMeta }
251
254
// debug.handlers(container + ' item ' + (url.url || url) + ' ' + contentType + ' ' + path)
252
255
// check if file exists, and in that case that it has the same extension
253
256
if ( ! container ) { await this . checkFileExtension ( url , path ) }
@@ -260,7 +263,6 @@ class LDP {
260
263
// clearAclCache()
261
264
}
262
265
// Directory created, now write the file
263
- if ( container ) return
264
266
return withLock ( path , ( ) => new Promise ( ( resolve , reject ) => {
265
267
// HACK: the middleware in webid-oidc.js uses body-parser, thus ending the stream of data
266
268
// for JSON bodies. So, the stream needs to be reset
You can’t perform that action at this time.
0 commit comments