@algorithm-shift/design-system 1.2.987 → 1.2.988

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -350,7 +350,7 @@ function useFileService(options) {
350
350
  formData.append(key, value);
351
351
  });
352
352
  const axiosClient = options.axiosInstance ?? axios;
353
- const apiUrl = "/fileservice/upload";
353
+ const apiUrl = options.apiUrl ?? "/fileservice/upload";
354
354
  const result = await axiosClient.post(`${apiUrl}`, formData, {
355
355
  withCredentials: true
356
356
  });
@@ -422,6 +422,7 @@ var ImageControl = ({
422
422
  style,
423
423
  imageUrl,
424
424
  altText = "Preview",
425
+ apiUrl,
425
426
  ...props
426
427
  }) => {
427
428
  const defaultImgClass = cn(
@@ -438,6 +439,7 @@ var ImageControl = ({
438
439
  };
439
440
  const { uploadFile } = useFileService({
440
441
  axiosInstance: props.axiosInstance,
442
+ apiUrl,
441
443
  onSuccess: async (result) => {
442
444
  if (!result?.data?.url && !props.onSuccess) return;
443
445
  props.onSuccess?.({ url: result.data.url || "", fileName: result.data.originalname || "" });