Comments (6)
Hi @Kishanspaceo, the fix for this issue is now available via v1.1.2 🎉
from imgix-swift.
Hi @Kishanspaceo,
It appears that the URL you provided has a bad domain (imgix.net
). You can find the domain for your source in the imgix dashboard source view. And for more information, feel free to read through our documentation on serving images.
If fixing that still does not work for you, could you please provide a code example and any associated error message you get when calling buildURL
? Thank you!
from imgix-swift.
I have a url like "https://myproject.imgix.net/staging/photos/196341/e47eefb34a6b7c415873a0f8945216704f0d/جبن_مع_الراب_الرومى.jpg"
I am trying to build url with 2 portions...
- myproject.imgix.net
- staging/photos/196341/e47eefb34a6b7c415873a0f8945216704f0d/جبن_مع_الراب_الرومى.jpg
But it crashes, as it has arabic characters.
My code is also working, when we have all english characters and it successfully generate the url.
It says
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[NSURLComponents setPercentEncodedPath:]: invalid characters in percentEncodedPath'
from imgix-swift.
let client = ImgixClient.init(host: "myproject.imgix.net")
let url = client.buildUrl("staging/photos/196341/e47eefb34a6b7c415873a0f8945216704f0d/جبن_مع_الراب_الرومى.jpg", params: [
"w": 300,
"h": 300,
"fit": "crop"
])
debugPrint(url)
from imgix-swift.
Hi @Kishanspaceo,
Thank you for providing these examples, they are very helpful. I am currently investigating this issue and hope to have an solution for you sometime this week.
from imgix-swift.
in the function func sanitizePath(_ path: String) -> String
after declaring path variable,
path = path.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) ?? path
adding above line would work.
from imgix-swift.
Related Issues (8)
- Build issue with pod HOT 8
- invalid signatures for comma-separated values without base64 encoding HOT 1
- feat: allow `buildUrl` to use pre-encoded URLs HOT 2
- Allow the imgix swift library to have initializer that accepts no `host` parameter
- iOS 9.0 HOT 1
- Accept NSURL or NSURLCompontents HOT 6
- sigabort crash HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imgix-swift.