Skip to content

Commit b38d48d

Browse files
committed
fix img delete - url decoder added.
1 parent ef671ba commit b38d48d

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

AgudaApp/platforms/android/app/src/main/assets/www/build/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AgudaApp/src/pages/admin-panel/new-event/new-event.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export class NewEventPage {
4949
this.pageTitle = "ערוך אירוע";
5050
this.actionButton = "ערוך";
5151
if(this.imageUrl.includes('firebasestorage')){
52-
this.tmpUrl = this.imageUrl.substring(this.imageUrl.indexOf('_')+1, this.imageUrl.indexOf('?'));
52+
this.tmpUrl = decodeURI(this.imageUrl.substring(this.imageUrl.indexOf('_')+1, this.imageUrl.indexOf('?')));
5353
this.fbImg = true;
5454
}
5555
}

AgudaApp/src/pages/admin-panel/new-home-story/new-home-story.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class NewHomeStoryPage {
4545
this.pageTitle = "ערוך סיפור";
4646
this.actionButton = "ערוך";
4747
if(this.imageUrl.includes('firebasestorage')){
48-
this.tmpUrl = this.imageUrl.substring(this.imageUrl.indexOf('_')+1, this.imageUrl.indexOf('?'));
48+
this.tmpUrl = decodeURI(this.imageUrl.substring(this.imageUrl.indexOf('_')+1, this.imageUrl.lastIndexOf('?')));
4949
this.fbImg = true;
5050
}
5151
}

AgudaApp/src/providers/database/database.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ export class DatabaseProvider {
8989
}
9090

9191
deleteImage(url: string){
92-
const path = url.substring(url.lastIndexOf('/') + 1, url.indexOf('?')).replace('%2F', '/');
93-
return this.storage.ref(path).delete();
92+
const path = url.substring(url.lastIndexOf('/') + 1, url.lastIndexOf('?')).replace('%2F', '/');
93+
return this.storage.ref(decodeURI(path)).delete();
9494
}
9595

9696
getCurrentTimestamp(): string{ //format: yyyyMMddHHmmSS

0 commit comments

Comments
 (0)