Skip to content

Commit

Permalink
Use absolute imports for Uploader
Browse files Browse the repository at this point in the history
This does not work in some Rails apps.
Not sure why, but with absolute urls it works.
  • Loading branch information
tvdeyen committed Dec 14, 2023
1 parent f0088ab commit b0ce037
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions app/javascript/alchemy_admin/components/uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* @property {string} name
* @property {number} size
*/
import { AlchemyHTMLElement } from "./alchemy_html_element"
import { Progress } from "./uploader/progress"
import { FileUpload } from "./uploader/file_upload"
import { AlchemyHTMLElement } from "alchemy_admin/components/alchemy_html_element"
import { Progress } from "alchemy_admin/components/uploader/progress"
import { FileUpload } from "alchemy_admin/components/uploader/file_upload"
import { translate } from "alchemy_admin/i18n"
import { getToken } from "alchemy_admin/utils/ajax"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AlchemyHTMLElement } from "../alchemy_html_element"
import { AlchemyHTMLElement } from "alchemy_admin/components/alchemy_html_element"
import { formatFileSize } from "alchemy_admin/utils/format"
import { translate } from "alchemy_admin/i18n"

Expand Down
6 changes: 3 additions & 3 deletions app/javascript/alchemy_admin/components/uploader/progress.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AlchemyHTMLElement } from "../alchemy_html_element"
import { FileUpload } from "./file_upload"
import { formatFileSize } from "../../utils/format"
import { AlchemyHTMLElement } from "alchemy_admin/components/alchemy_html_element"
import { FileUpload } from "alchemy_admin/components/uploader/file_upload"
import { formatFileSize } from "alchemy_admin/utils/format"

export class Progress extends AlchemyHTMLElement {
#visible = false
Expand Down

0 comments on commit b0ce037

Please sign in to comment.