Questions tagged [urlloader]
219 questions
80
votes
7 answers
Dynamically Add Images React Webpack
I've been trying to figure out how to dynamically add images via React and Webpack. I have an image folder under src/images and a component under src/components/index. I'm using url-loader with the following config for webpack
{
test:…
![](../../users/profiles/5342984.webp)
pandorz
- 803
- 1
- 6
- 4
56
votes
2 answers
Url-loader vs File-loader Webpack
I'm trying to figure out the difference between url-loader vs file-loader. What does DataURl mean?
The url-loader works like the file-loader, but can return a DataURL if
the file is smaller than a byte limit.
![](../../users/profiles/6730305.webp)
stackjlei
- 7,747
- 12
- 42
- 95
22
votes
7 answers
webpack not able to import images( using express and angular2 in typescript)
I am not able to import images in my headercomponent.ts.
I suspect it is because of something i am doing wrong while compiling ts(using webpack ts loader) because same thing works with react( where the components are written in es6)
The error…
![](../../users/profiles/5367829.webp)
Sahil Sharma
- 1,183
- 2
- 8
- 21
21
votes
1 answer
webpack require relative image
I have two files:
./img/mypic.png
./js/help/targets/target.js
In target.js:
With webpack.config.js:
14 module: {
15 loaders: [
16 { test: /\.js$/, loader: 'jsx-loader?harmony' },
17…
![]({require("../../../img/target.png")})
![](../../users/profiles/63621.webp)
Henrik
- 9,303
- 4
- 49
- 83
17
votes
4 answers
Webpack url-loader set destination path
I'm using webpack's url-loader plugin and have it configured as:
{
test: /\.(ttf|eot|woff|woff2|svg)$/,
loader: "url-loader?limit=50000"
}
It output files > 50k to the file system, but I can't find how to set a destination path.
In this…
![](../../users/profiles/3900456.webp)
user3900456
- 1,913
- 3
- 20
- 30
17
votes
1 answer
Access HTTP response headers in for flash.net.URLLoader object?
Is there a way to access the response headers from an HTTP result when using Flash/Flex's URLLoader?
Setting the request headers is possible, as is accessing the response code, but getting a hold of the actual response headers seems to be…
![](../../users/profiles/26331.webp)
aaaidan
- 6,422
- 8
- 58
- 98
12
votes
3 answers
Webpack [url/file-loader] is not resolving the Relative Path of URL
I am facing a problem in Webpack regarding Relative Path.
Let me try to explain the scenario :
I have 2 separate project in Workspace directory :
Project-A [Bundling using Gulp] : Stable & Working
Project-B [Bundling using Webpack] : New…
![](../../users/profiles/1681972.webp)
Ravi Roshan
- 1,011
- 2
- 8
- 28
8
votes
0 answers
React + SSR + webpack + node, unexpected token �PNG
I'm having webapp in react with server side rendering feature running on node server. I'm using local images from assets directory (as shown below:
which is running fine on the…
![]({require('../../../assets/img/image.png')})
![](../../users/profiles/5524004.webp)
Satish Lakhani
- 280
- 2
- 9
8
votes
2 answers
Image Upload progress using URLLoader AS3
I am developing image uploader in Flash. I use FileReference.browse to browse image then resize this image to 1000 x 1000 px, if the image is very big and then upload to server. I want to show progressbar for the image upload progress.
I am usinng…
Neeraj Khanna
7
votes
3 answers
Why is my URLLoader not dispatching when it completes?
I'm using a URLLoader to send a few key/value pairs to a php script, which then turns them into an e-mail, sends it (or not), and then echoes a string with a response.
At first it works fine. The URLLoader posts, and I get my e-mail a minute later,…
![](../../users/profiles/72956.webp)
Matt Chase
- 111
- 1
- 7
7
votes
4 answers
url-loader / file-loader breaking relative paths in css output using webpack
I am using webpack with some plugins and loaders to take my src/ folder and build a dist/ folder. url-loader (which falls back to file-loader when images are larger than a specific limit) is outputting images it finds in my html and scss files to…
![](../../users/profiles/10154403.webp)
Jordan Walker
- 414
- 1
- 3
- 11
7
votes
2 answers
Unable to resolve absolute url() paths for background images in CSS with Webpack
I have the following Webpack config (roughly, it has been simplified for this post):
const rootPublic = path.resolve('./public');
const LOCAL_IDENT_NAME = 'localIdentName=[name]_[local]_[hash:base64:5]';
const CSS_LOADER =…
![](../../users/profiles/524075.webp)
Muers
- 2,960
- 3
- 24
- 30
6
votes
1 answer
Flex Multipart Upload Progress
I am uploading a file to a server using a multipart URLLoader. I am able to upload the file fine. I have tried to listen to the progress event on the URLLoader but it only fires at the very end of the upload. How do I get the progress event more…
![](../../users/profiles/143074.webp)
asawilliams
- 2,838
- 2
- 26
- 53
6
votes
1 answer
How do I fix this cross-domain ActionScript 3 error?
I'm going to be as specific and verbose as possible and include some of the code I'm using. I already did a search and found this question, which seems similar; however the author there was using ActionScript 2 instead of 3, and I couldn't seem to…
![](../../users/profiles/5454.webp)
soapergem
- 7,597
- 16
- 79
- 124
6
votes
3 answers
Unexpected Flash Security Exception When Using URLLoader
What I am trying to accomplish is to upload some binary data, specifically a ByteArray representing a PNG image, to a server using the URLLoader class in conjunction with URLRequest.
When I set the contentType property of the URLRequest to…
![](../../users/profiles/21475.webp)
Cameron
- 86,330
- 19
- 177
- 216