Platform
Learn
Community
Support
Sign up
or
Log in
Profile
messages
Messages
logout
Logout
Platform
Home
Downloads
IPP
Licensing
Project Sizing
Beta
Learn
Training
Documentation
Evaluation Guide
Community
Jobs
Home
Forums
Forge
Ideas
Badges
Members
Support
Partner Guide
Resources Library
Opportunities
Account Management
Pre Sales Demos
Sign up
or
Log in
Home
Jobs
Forums
Forge
Ideas
Members
Badges
Dear ,
What would improve your OutSystems Community experience? Let us know by taking this 2-minute survey.
Pick up the survey
Community
›
Forums
›
Forge Discussions
[OutSystems Now] DeviceFeatures\SaveFile webblock: how to save file in a different directory?
OutSystemsNow
OutSystemsNow
New Post
New Post
Forge Component
OutSystems Now
(44)
Published on 2018-10-11 by OutSystems R&D
44 votes
Published on 2018-10-11 by OutSystems R&D
Pedro Gonçalves
Posted on 2016-03-16
Pedro Gonçalves
Rank: #37
Posted on 2016-03-16
Hi,
When using
DeviceFeatures\SaveFile
webblock, if I include a directory path in the Filename input parameter (e.g.
"
outsystems-now-test/log.txt
"
), it won't work and I get an INVALID_MODIFICATION_ERR message, such as the one below:
Probably some error in trying to modify the device's filesystem (this is Android, by the way).
Any ideas on how to overcome this?
Will further digging into the
Apache Cordova API
be needed?
Thanks!
César Afonso
Posted on 2016-03-24
César Afonso
Rank: #264
Posted on 2016-03-24
Solution
Hello Pedro.
The way that the SaveFile WebBlock is implemented won’t allow you to provide that kind of paths. It just expects the Filename. To achieve what you want you’ll have to change the SaveFile javascript to use more sophisticated logic. One example is using the
resolveLocalFileSystemURL
window.resolveLocalFileSystemURL(cordova.file.externalDataDirectory, function(dir) { });
For more examples you’ll have to take a closer look at the
Cordova File Plugin – Where To Store Files
Thanks
Solution
Login to reply
New Post
Available Forums
Technology & Integration
News and Announcements
Forge Discussions
Meta
Hints and How-To Guides
Usability
Installation Troubleshooting
Personal Environment Troubleshooting
Forum Notifications
Email Digest Settings
Loading...
(hidden) New Badge Popup