Revert "v2.39.0 (#2180)"

This reverts commit 1e228c86c3.
This commit is contained in:
Raktima
2026-05-25 17:24:36 +05:30
committed by GitHub
parent 1e228c86c3
commit 7b4d0bf052
92 changed files with 5372 additions and 8680 deletions
@@ -43,7 +43,7 @@ function makeS3Client() {
}
export default async function getPresignedUrl(url) {
if (url?.includes('/files/')) {
if (url?.includes('files')) {
return presignedlocalUrl(url);
} else {
const client = makeS3Client();
@@ -70,7 +70,7 @@ export async function getSignedUrl(request) {
if (docId || templateId) {
try {
if (url?.includes('/files/')) {
if (url?.includes('files')) {
return presignedlocalUrl(url);
} else if (useLocal !== 'true') {
const query = new Parse.Query(docId ? 'contracts_Document' : 'contracts_Template');
@@ -106,7 +106,7 @@ export async function getSignedUrl(request) {
if (!isAuth) {
throw new Parse.Error(Parse.Error.INVALID_SESSION_TOKEN, 'User is not authenticated.');
} else {
if (url?.includes('/files/')) {
if (url?.includes('files')) {
return presignedlocalUrl(url);
} else if (useLocal !== 'true') {
const presignedUrl = await getPresignedUrl(url);
@@ -147,7 +147,7 @@ export function getSignedLocalUrl(fileUrl, expirationTimeInSeconds) {
}
export function presignedlocalUrl(signedUrl, expirationTimeInSeconds) {
if (signedUrl?.includes('/files/')) {
if (signedUrl?.includes('files')) {
const fileUrl = signedUrl.split('?')?.[0];
const secretKey = process.env.MASTER_KEY;
const exp = expirationTimeInSeconds || 200;