Added JSON response to Upload endpoint

This commit is contained in:
2024-02-15 21:51:57 +01:00
parent dbc72a3dc4
commit 3ebac8cf67
4 changed files with 18 additions and 6 deletions

View File

@ -26,7 +26,7 @@ export class UploadComponent {
singleDownload: boolean = false;
fileDescription: string = '';
passwordProtected: boolean = false;
password: string = 'nigga123';
password: string = ''; // Generated by the server for only this file
uploadStarted: boolean = false;
uploadProgress = 0; // Real progress
@ -95,7 +95,8 @@ export class UploadComponent {
axios.post(this.developmentStore.getBaseUrl() + 'api/v1/upload', formData, config)
.then(response => {
console.log('Upload completed successfully:', response.data);
console.log('Upload completed successfully!');
console.log(response.data);
this.uploadFinished = true;
})
.catch(error => {

View File

@ -13,6 +13,7 @@ export class DevelopmentStore {
constructor() {
this.isDevelopment = location.port === '4200';
console.log("Development mode enabled: " + this.isDevelopment);
}
getIsDevelopment(): boolean {