Skip to content

Commit

Permalink
Uploader asset
Browse files Browse the repository at this point in the history
  • Loading branch information
timkelty committed Jun 1, 2023
1 parent d25e0c6 commit 370a23e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Running webpack-dev-server from host
DEV_SERVER_PUBLIC=http://localhost:8085/
DEV_SERVER_PORT=8085
DEV_SERVER_LOOPBACK=http://host.docker.internal:8085

# Running webpack-dev-server within container
# DEV_SERVER_PUBLIC=http://my-project.tld:3000/
# DEV_SERVER_PORT=3000
# DEV_SERVER_HOST=0.0.0.0
# DEV_SERVER_LOOPBACK=http://0.0.0.0:3000
5 changes: 5 additions & 0 deletions src/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use craft\cloud\fs\AssetFs;
use craft\cloud\fs\CpResourcesFs;
use craft\cloud\fs\StorageFs;
use craft\cloud\web\assets\uploader\UploaderAsset;
use craft\events\RegisterComponentTypesEvent;
use craft\events\RegisterTemplateRootsEvent;
use craft\helpers\App;
Expand Down Expand Up @@ -128,6 +129,10 @@ public function bootstrap($app): void
);
}

if ($app->getRequest()->getIsCpRequest()) {
$app->getView()->registerAssetBundle(UploaderAsset::class);
}

Craft::$container->set(
\craft\fs\Temp::class,
[
Expand Down

0 comments on commit 370a23e

Please sign in to comment.