As it is shown in this screenshot I can access an image from Chrome desktop but not by in Xwalk.
However, the asset is present in assets/www/application/app
and in .meteor/local/build/programs/web.cordova/app
The actual path of the image is generated by adding http://localhost:12752/local-filesystem/
before the file path as stated in the docs .
You should very probably put your static assets like such image in the [root]/public/
special folder of your Meteor project:
- public
All files inside a top-level directory called
public/
are served as-is to the client. When referencing these assets, do not includepublic/
in the URL, write the URL as if they were all in the top level. For example, referencepublic/bg.png
as<img src='/bg.png' />
. This is the best place forfavicon.ico
,robots.txt
, and similar files.
The page you refer to is about accessing files on the device storage (typically once a photo has been taken through a camera plugin), not your app static files:
[…] You can use this to convert URLs received from plugins like
cordova-plugin-file
andcordova-plugin-camera
for example.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.