Spaces:
Running
Running
fix(App.jsx): update Cloudinary upload preset and URL to use Vite environment variables
Browse files- src/App.jsx +2 -2
src/App.jsx
CHANGED
@@ -31,11 +31,11 @@ const getFilenameWithoutExtension = filename => {
|
|
31 |
const uploadToCloudinary = async (file) => {
|
32 |
const formData = new FormData();
|
33 |
formData.append('file', file);
|
34 |
-
formData.append('upload_preset',
|
35 |
|
36 |
try {
|
37 |
const response = await axios.post(
|
38 |
-
|
39 |
formData
|
40 |
);
|
41 |
|
|
|
31 |
const uploadToCloudinary = async (file) => {
|
32 |
const formData = new FormData();
|
33 |
formData.append('file', file);
|
34 |
+
formData.append('upload_preset', import.meta.env.VITE_REACT_APP_CLOUDINARY_UPLOAD_PRESET);
|
35 |
|
36 |
try {
|
37 |
const response = await axios.post(
|
38 |
+
import.meta.env.VITE_REACT_APP_CLOUDINARY_UPLOAD_URL,
|
39 |
formData
|
40 |
);
|
41 |
|