Skip to content

Commit

Permalink
Merge pull request #734 from AFP-Medialab/integration-issue-727
Browse files Browse the repository at this point in the history
Integration issue 727
  • Loading branch information
AFPMedialab authored Feb 14, 2025
2 parents a1b6310 + dd12b62 commit 6aac057
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ The Verification plugin is a browser based plugin built with React and Redux.
REACT_APP_DBKF_SEARCH_API=<dbkf_url>
REACT_APP_DBKF_SIMILARITY_API=<dbkf_similarity_url>
REACT_APP_BASEURL=<baseurl>
REACT_APP_WRAPPER=<wrapper_url>
REACT_APP_CAA_FORENSICS_URL=<forensics_url>
REACT_APP_CAA_ANALYSIS_URL=<analysis_url>
REACT_APP_CAA_ENVISU4_UTILS_URL=<envisu4_url>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions src/components/NavItems/tools/C2pa/C2pa.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { ArrowDownward } from "@mui/icons-material";

import HeaderTool from "components/Shared/HeaderTool/HeaderTool";
import { i18nLoadNamespace } from "components/Shared/Languages/i18nLoadNamespace";
import useMyStyles from "components/Shared/MaterialUiStyles/useMyStyles";
import StringFileUploadField from "components/Shared/StringFileUploadField";
import exifr from "exifr";
import {
Expand Down Expand Up @@ -62,8 +61,6 @@ const C2paData = () => {

const dispatch = useDispatch();

const classes = useMyStyles();

const keyword = i18nLoadNamespace("components/NavItems/tools/C2pa");

const [errorMessage, setErrorMessage] = useState(null);
Expand Down Expand Up @@ -115,6 +112,7 @@ const C2paData = () => {
try {
res = await authenticatedRequest(config);
} catch (error) {
console.log(error);
setErrorMessage(keyword("error_message_reverse_search_generic"));
return;
}
Expand Down Expand Up @@ -206,7 +204,7 @@ const C2paData = () => {
method: "get",
responseType: "blob",
maxBodyLength: Infinity,
url: `https://plugin-archiving.afp.com/gateway/c2paafp${urls.thumbnailUrl}`,
url: `${serverUrl}${urls.thumbnailUrl}`,
headers: {
"X-AFP-TRANSACTION-ID": getTransactionId(),
},
Expand Down
10 changes: 6 additions & 4 deletions src/components/NavItems/tools/Gif/Hooks/useGetGif.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { useEffect } from "react";
import { useDispatch } from "react-redux";
import { setError } from "redux/reducers/errorReducer";

import { i18nLoadNamespace } from "components/Shared/Languages/i18nLoadNamespace";
import { saveAs } from "file-saver";
import { setError } from "redux/reducers/errorReducer";

import {
setStateDownloading,
setStateBackResults,
setStateDownloading,
} from "../../../../../redux/reducers/tools/gifReducer";
import { saveAs } from "file-saver";
import useAuthenticatedRequest from "../../../../Shared/Authentication/useAuthenticatedRequest";

const useGetGif = (
Expand All @@ -19,7 +21,7 @@ const useGetGif = (
const keyword = i18nLoadNamespace("components/NavItems/tools/Forensic");
const dispatch = useDispatch();
const authenticatedRequest = useAuthenticatedRequest();
const baseURL = process.env.REACT_APP_BASEURL;
const baseURL = process.env.REACT_APP_WRAPPER;

useEffect(() => {
const handleError = (e) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import { useEffect } from "react";
import { useDispatch, useSelector } from "react-redux";

import { setError } from "redux/reducers/errorReducer";

import {
setStateError,
setStateLoading,
setStateShow,
} from "../../../../../redux/reducers/tools/gifReducer";
import { setError } from "redux/reducers/errorReducer";
import useAuthenticatedRequest from "../../../../Shared/Authentication/useAuthenticatedRequest";

const useGetHomographics = (files, mode, keyword) => {
const dispatch = useDispatch();
const toolState = useSelector((state) => state.gif.toolState);
const baseURL = process.env.REACT_APP_BASEURL;
const baseURL = process.env.REACT_APP_WRAPPER;

const authenticatedRequest = useAuthenticatedRequest();

Expand Down

0 comments on commit 6aac057

Please sign in to comment.