I have download Teamsisu/contao-greyify and upload in vendor/ teamsisu folder.
Then give the inserttag
{{greyify::assets/images/9/Vicus-wint-iCMG-Enterprise-IT-Architecture-Excellence-Award-2016_banner-a428ab58.png/UUID?width=x&height=x&mode=x}}
But it doesn't work
Never use paths from the assets/images directory, since that is just the image cache. You need to reference the source image instead. You probably misinterpreted the README of the extension. You either use the path to the source image - or you provide the UUID of the file.
Example with image path
{{greyify::files/public/banner.png?width=200&height=100&mode=crop}}
Example with image UUID
{{greyify::c42739fa-39b8-11e9-b257-8c1645f08cc5?width=200}}
Related
I'm using react-native-image-picker to pick the images. After picking image, I want to upload these image to server using fetch, there I need an absolute file path. So, for converting URI to path I'm using rn-fetch-blob, but it is throwing errors as follow.
failed to stat path "file:///Users/banuharshavardhan/Library/Developer/CoreSimulator/Devices/407B8294-598D-41B3-84FC-E9217F8A434F/data/Containers/Data/Application/63B690A7-976E-4057-91CD-1314B3D3DDBC/tmp/521AC266-01E2-4B20-A8F6-4A3001B0D459.png" because it does not exist or it is not a folder
Can you explain that what I did wrong. I'm running this on iOS simulator.
I'm thinking that, the URI given by react-native-image-picker was a temporary location, that's why it doesn't exists. But don't know what exactly the problem is.
you just need to remove the file:// part from the path
I have a Rails application which is suppose to upload images from a Dropbox URL pointed to a folder. The folder contains the images. Application is suppose to upload all images present in folder.
The URL is somewhat like this
https://www.dropbox.com/sh/17fsm6bsnac1g4q/AADJ7B2L0OIrkSrc7YcG-OO9a?dl=0
I can see the images but how can I get the list of all images URL. I have tried parsing the URL by appending dl=1 which downloads the images.
URI.parse('https://www.dropbox.com/sh/17fsm6bsnac1g4q/AADJ7B2L0OIrkSrc7YcG-OO9a?dl=1).
How can I get the URL of all images. If I can not get URL of images then how can i download all images and them upload them.
If you are okay with just downloading everything, you can make a GET request to the dl=1 version of the link you have. This URL parameter is documented here. This will give you a zipped version of the folder which you can then unzip and use as necessary.
Dropbox doesn't offer a way to get links for each of the files in the linked folder, but you can use the Dropbox API to list the files and then download them individually. You can use the /2/files/list_folder endpoint and pass the shared link in as the shared_link parameter. That will give you a list of the items in the folder.
You can then use /2/sharing/get_shared_link_file to download any desired file(s), by passing in the shared link as the url parameter, and the relative path for the file as the path parameter.
In my app I had a folder of images from which I was getting the names to use as keys to a Dictionary. I have now moved all images to an asset catalog and created groups for the relevant folders. The code using FileManager is not working anymore as it can not find any folders (due to the assets being compiled into a .car file).
How should I approach this?
So (following matt's suggestion) here is what I did:
I created a RunScript build phase to run before compiling
and used a script to create a txt file with the names of the files that I can then use during runtime
#!/bin/sh
>./your_app_folder/fileNames.txt
for FILE in ./your_app_folder/Images.xcassets/actions/*; do
echo $FILE >> ./your_app_folder/fileNames.txt
done
You have two choices:
Don't Do That. Go right on using a folder of images.
Supply the keys in some other way. If you don't want to hard-code them into the code itself, you could make a text file. But of course you will have to keep that text file updated as you add / remove images.
You'll notice that I didn't say you could magically introspect the asset catalog. That's because you can't.
Is it possible to choose to serve files only from a specific folder using Rikulo stream? I've tried
new StreamServer(uriMapping: _mapping, homeDir: 'my/web/webapp/app')
but I'm not getting the desired results as it's still serving files under the 'web' directory.
When homeDir is specified with a relative path, it is assumed to be relative to the current directory (Directory.current.path). I think it is not what you expect. You can use an absolute path for better control.
After examining the code, I think the relative path is better to base on the root directory rather than the current directory. Please follow Issue 29 for details. Also refer to the sample app here.
Here are the approaches we tried but did not work
Version control the images - bloats up our git repo, not a good idea
Images on DropBox - Whenever our designer adds an image on Dropbox it gets available to engineers, but the engineers then have to add the new image to their Resources manually.
Image folder on DB, link folder under Resources - Same as above, but we add the folder under Resources, not the image files. However, the manual process of adding newly added images still remain.
What are the best practices you have followed?
Have you tried adding a Folder Reference instead of a group when adding it to your project and using DropBox to keep that folder up to date with your images ?
As a Folder Reference, it should always reflect the current state of the linked folder without the need to manually add each file as it is downloaded from DB.
After running a quick test, I found that adding Folder References and trying to use the images from there with [UIImage imageNamed:#"fileName.png"] doesn't find the actual image.
You have to actually include the relative path to your Folder Reference, like this:
UIImage * imageFromFolderReference = [UIImage imageNamed:#"FolderReferenceName/fileName.png"];
That seemed to do the trick.