NTP-8231 | OE Changes for AWS Upload (#14307)

This commit is contained in:
Prajjaval Verma
2024-12-24 12:15:52 +05:30
committed by GitHub
parent f21e4633d4
commit 9328ea132d
2 changed files with 13 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
/*
*
* * Copyright © 2022 by Navi Technologies Limited
* * Copyright © 2022-2024 by Navi Technologies Limited
* * All rights reserved. Strictly confidential
*
*/
@@ -8,6 +8,8 @@
package com.navi.common.awsupload.repository
import com.navi.common.awsupload.model.AWSPresignedUrlRequest
import com.navi.common.checkmate.model.MetricInfo
import com.navi.common.constants.AWS_UPLOAD
import com.navi.common.network.retrofit.ResponseCallback
import com.navi.common.utils.retrofitService
import javax.inject.Inject
@@ -20,11 +22,18 @@ import retrofit2.http.Url
class AWSUploadRepository @Inject constructor() : ResponseCallback() {
suspend fun generateAWSPreSignedUrl(awsPreSignedUrlRequest: AWSPresignedUrlRequest) =
apiResponseCallback(retrofitService().postAWSPreSignedUrl(awsPreSignedUrlRequest))
apiResponseCallback(
response = retrofitService().postAWSPreSignedUrl(awsPreSignedUrlRequest),
metricInfo = MetricInfo.CommonMetric(screen = AWS_UPLOAD, isNae = { false })
)
suspend fun uploadFile(
@Url url: String,
@PartMap awsPartMap: HashMap<String, RequestBody?>,
@Part file: MultipartBody.Part
) = apiResponseCallback(retrofitService().submitAWSSelfie(url, awsPartMap, file))
) =
apiResponseCallback(
response = retrofitService().submitAWSSelfie(url, awsPartMap, file),
metricInfo = MetricInfo.CommonMetric(screen = AWS_UPLOAD, isNae = { false })
)
}

View File

@@ -33,6 +33,7 @@ const val APP_UPGRADE_DATA = "APP_UPGRADE_DATA"
const val QA = "qa"
const val SCROLL_TO_TOP_STATE_KEY = "ScrollToTopStateKey_"
const val SCROLL_TO_WIDGET = "scroll_to_widget"
const val AWS_UPLOAD = "AWS_UPLOAD"
// Chat constants
const val HELP_CTA_TEXT = "HELP"