Skip to content

Commit

Permalink
fix the download caused by name conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
sumn2u committed Jun 11, 2024
1 parent 97303e6 commit a4d40b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client/src/utils/get-data-from-server.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios'
import config from '../../config'
import config from '../../config.js'
export const getImages = () => {

const promise = axios.get(`${config.VITE_SERVER_URL}/imagesInfo`)
Expand All @@ -11,9 +11,9 @@ export const getImages = () => {
return dataPromise
}

export const getImageFile = (api, config) => {
return new Promise((resolve, reject) => {
axios.post(`${config.VITE_SERVER_URL}/${api}`, config, { responseType: 'blob' })
export const getImageFile = (api, configuration) => {
return new Promise((resolve, reject) => {
axios.post(`${config.VITE_SERVER_URL}/${api}`, configuration, { responseType: 'blob' })
.then(response => {
const url = window.URL.createObjectURL(new Blob([response.data]));
resolve(url);
Expand Down

0 comments on commit a4d40b7

Please sign in to comment.