tanishqgandhi1908 commented on code in PR #8078:
URL: https://github.com/apache/texera/pull/8078#discussion_r3891586041
##########
frontend/src/app/dashboard/component/user/files-uploader/files-uploader.component.ts:
##########
@@ -75,17 +79,21 @@ export class FilesUploaderComponent {
fileUploadingFinished: boolean = false;
fileUploadBannerType: "error" | "success" | "info" | "warning" = "success";
fileUploadBannerMessage: string = "";
- singleFileUploadMaxSizeMiB: number = 20;
+ singleFileUploadMaxSizeMiB: number =
DATASET_FILE_RESOURCE_ENDPOINT.defaultMaxFileSizeMiB;
constructor(
private notificationService: NotificationService,
private adminSettingsService: AdminSettingsService,
- private datasetService: DatasetService,
+ private multipartUploadService: MultipartUploadService,
private modal: NzModalService
- ) {
- // A missing key or failed fetch keeps the initializer default above.
+ ) {}
+
+ // The ceiling is read here rather than in the constructor because
`endpoint` is an @Input, and it
+ // decides both the setting key and the fallback. A missing key or failed
fetch keeps the fallback.
+ ngOnInit(): void {
+ this.singleFileUploadMaxSizeMiB = this.endpoint.defaultMaxFileSizeMiB;
this.adminSettingsService
- .getPublicSetting("dataset_single_file_upload_max_size_mib")
+ .getPublicSetting(this.endpoint.maxFileSizeSettingKey)
Review Comment:
You're right. That key was wrong in a working file I applied while building
the branch and I fixed it before the first commit
Removed it from the description
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]