Skip to content

Commit

Permalink
fix links + immagini
Browse files Browse the repository at this point in the history
  • Loading branch information
gallomaf committed Oct 7, 2024
1 parent 241558f commit 1c24199
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 59 deletions.
30 changes: 10 additions & 20 deletions public/Images/Buste/busta-DL-foglio-flyer-bk.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 4 additions & 5 deletions public/upload.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?php

// Consente le richieste da qualunque dominio (può essere personalizzato con un dominio specifico)
header("Access-Control-Allow-Origin: *");
//header("Access-Control-Allow-Origin: *");

// Se vuoi consentire solo un dominio specifico, sostituisci * con il dominio esatto
// header("Access-Control-Allow-Origin: https://spedireadesso.com");
header("Access-Control-Allow-Origin: https://spedireadesso.com");

// Le altre intestazioni necessarie per le richieste CORS
header("Access-Control-Allow-Methods: POST, GET, OPTIONS");
Expand All @@ -26,9 +25,9 @@

//rinomina il file con un nome univoco
$fileName = uniqid() . '_' . $fileName;
$targetFilePath = $targetDir . $fileName;
//rimuovi gli spazi dal nome del file
$targetFilePath = str_replace(' ', '_', $targetFilePath);
$fileName = str_replace(' ', '_', $fileName);
$targetFilePath = $targetDir . $fileName;

//scrivi la stringa "CIAO" in un file di testo chiamato log.txt
//$file = fopen("log.txt", "w");
Expand Down
5 changes: 2 additions & 3 deletions src/Components/Colonne/ColonnaSx.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@ const ColonnaSx = () => {
<p className="des-sub-lhs">
Per maggiori informazioni su questo{" "}
<a
href="https://www.spedireadesso.com/posta-pubblicitaria.html"
href="https://www.spedireadesso.com/servizio-di-stampa-imbustamento-affrancatura-ed-invio.html"
target="_blank"
rel="noopener noreferrer"
>
nuovo<br></br> servizio postale clicca qui.
nuovo servizio postale clicca qui.
</a>
</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Navbar/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function CollapsibleExample() {
<div className="info-icon">
<i className="bi bi-info-square"></i>
</div>
<Navbar.Brand href="#home">
<Navbar.Brand href="https://www.spedireadesso.com">
<div>
<img src={`${process.env.PUBLIC_URL}/Images/Logo.svg`}
alt="SpedireAdesso" className="logo-img"/>
Expand Down
16 changes: 8 additions & 8 deletions src/Pages/Cartoline/Step4/Step2of4/Step2of4Cartoline.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function Step2of4Cartoline() {
const step4Grammatura = localStorage.getItem("step4Grammatura");
const step4Carta = localStorage.getItem("step4Carta");
const step4File = localStorage.getItem("step4File");
const step4FileSize = localStorage.getItem("step4FileSize");
//const step4FileSize = localStorage.getItem("step4FileSize");

//fine variabili da passare tra i vari steps
const navigate = useNavigate();
Expand All @@ -53,7 +53,7 @@ export default function Step2of4Cartoline() {
//inizio gestione upload file

// Stato per gestire il file selezionato e la visibilità dell'anteprima
const [selectedFile, setSelectedFile] = useState(step4File ? "https://www.spedireadesso.com/marketingpostale/uploads/" + step4File : null);
const [selectedFile, setSelectedFile] = useState(step4File ? "https://www.spedireadesso.com/modulo-preventivo-postale/uploads/" + step4File : null);

const [previewVisible, setPreviewVisible] = useState(false);

Expand Down Expand Up @@ -109,20 +109,20 @@ export default function Step2of4Cartoline() {

// Controllo della risposta dal server
if (response.status === 200) {
console.log(response);
//console.log(response);
localStorage.setItem("step4File", response.data.fileName); // Salva il nome univoco del file
localStorage.setItem("step4FileSize", response.data.fileSize); // Salva la dimensione del file
//alert("File caricato con successo");
console.log(response.data.message);
console.log(response.data.fileName);
//console.log(response.data.message);
//console.log(response.data.fileName);
}

} catch (error) {
console.error("Errore durante il caricamento del file:", error);
//alert("Errore durante il caricamento del file.");
ErrorToast("Errore durante il caricamento del file.");
}
};
};//fine handleUpload

//fine gestione upload file

Expand All @@ -149,7 +149,7 @@ export default function Step2of4Cartoline() {
const type_of_paper = isCheckedT1
? "Patina lucida"
: isCheckedT2
? "Patinata opaca"
? "Patina opaca"
: "";

//inizio variabili reali
Expand Down Expand Up @@ -597,7 +597,7 @@ export default function Step2of4Cartoline() {
}
htmlFor="flexRadioDefaultT2"
>
Patinata opaca
Patina opaca
</label>
</div>
</div>
Expand Down
Loading

0 comments on commit 1c24199

Please sign in to comment.