Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
DoliSCAN
client-cordova
Commits
fb5735d8
Commit
fb5735d8
authored
Feb 27, 2020
by
Eric Seigne
Browse files
ios on essaye de passer sur le stockage Library persistant
parent
7a8f5b0f
Changes
3
Hide whitespace changes
Inline
Side-by-side
www/js/src/deprecated.js
View file @
fb5735d8
...
...
@@ -8,7 +8,7 @@
*************************************** */
function
readFromFile
(
fileName
,
formdata
,
subject
)
{
// myDebug('readFromFile (1) : ' + fileName);
var
pathToFile
=
window
.
cordova
.
file
.
d
ata
Directory
+
fileName
;
var
pathToFile
=
cordova
.
file
.
d
ocuments
Directory
+
fileName
;
window
.
resolveLocalFileSystemURL
(
fileName
,
function
(
fileEntry
)
{
// myDebug("readFromFile (2): " + JSON.stringify(fileEntry));
fileEntry
.
file
(
function
(
file
)
{
...
...
@@ -32,7 +32,7 @@ function readFromFile(fileName, formdata, subject) {
var
today
=
new
Date
();
var
destFilename
=
today
.
getFullYear
().
toString
()
+
(
'
0
'
+
(
today
.
getMonth
()
+
1
)).
slice
(
-
2
)
+
(
'
0
'
+
today
.
getDate
()).
slice
(
-
2
)
+
"
_
"
+
today
.
getHours
().
toString
()
+
today
.
getMinutes
().
toString
()
+
"
-
"
+
subject
+
"
-
"
+
basename
(
fileName
);
var
newFileUri
=
window
.
cordova
.
file
.
d
ata
Directory
;
var
newFileUri
=
cordova
.
file
.
d
ocuments
Directory
;
// myDebug('Sauvegarde de la photo dans (1): ' + newFileUri);
// myDebug('Sauvegarde de la photo dans (2): ' + destFilename);
moveFile
(
fileName
,
destFilename
);
...
...
www/js/src/ndf.js
View file @
fb5735d8
...
...
@@ -201,7 +201,7 @@ function moveFile(fileUri, newFileName) {
newFileUri
=
window
.
cordova
.
file
.
externalDataDirectory
;
}
else
{
newFileUri
=
window
.
cordova
.
file
.
d
ata
Directory
;
newFileUri
=
cordova
.
file
.
d
ocuments
Directory
;
}
oldFileUri
=
fileUri
;
window
.
resolveLocalFileSystemURL
(
newFileUri
,
...
...
www/js/src/sync.js
View file @
fb5735d8
...
...
@@ -48,7 +48,7 @@ function rSyncOne(idToSync) {
}
}
let
pathToFile
=
window
.
cordova
.
file
.
d
ata
Directory
;
let
pathToFile
=
cordova
.
file
.
d
ocuments
Directory
;
if
(
window
.
cordova
.
platformId
==
"
android
"
)
{
pathToFile
=
window
.
cordova
.
file
.
externalDataDirectory
;
//.replace("file://","");
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment