JMrJImmy commented on issue #610:
URL:
https://github.com/apache/cordova-plugin-file/issues/610#issuecomment-1781563233
Function Mimage_onclick()
options={quality : 75, correctOrientation: True, _
allowEdit : False, _
destinationType : 1}
navigator.camera.getPicture(onPictureReturned, onPictureError, options)
End Function
Function onPictureReturned(fileURI)
varLastSlash = InStrR(fileURI, "/", 0)
varfileURI = fileURI
varCacheSubfolder = InStr(1, fileURI, "cache", 0)
'NewDirectory = Left(varfileURI, varCacheSubfolder - 1) &
"/data/data/com.nsbasic.Vantastic/files/"
varROOT = InStr(1,fileURI, "Android",0)
PhotoName = Mid(fileURI, varROOT) 'The PhoneGap root file name
varDate = FormatDateTime(Now, vbYYYYhyphenMMhyphenDD)
rowindex = $("#GridQuest").jqxGrid("getselectedrowindex")
'gSelectedCategoryNumber = $("#GridQuest").jqxGrid("getcellvalue",
rowindex, "SURVEY_NO")
varQuestionNO = $("#GridQuest").jqxGrid("getcellvalue", rowindex,
"QUESTION_NO")
If Day(varDate) < 10 Then
PhotoDay = "0" & CStr(Day(varDate))
Else
PhotoDay = CStr(Day(varDate))
End If
If Month(varDate) <10 Then
PhotoMonth = "0" & CStr(Month(varDate))
Else
PhotoMonth = CStr(Month(varDate))
End If
varPicture = Trim(gSelectedBroker) & "-" & Trim(gSelectedCategoryNumber) &
"-" & Trim(gSelectedChainNumber) & "-" & Trim(gSelectedStoreNumber) & "-" &
CStr(Year(varDate)) & PhotoMonth & PhotoDay & "-" & Trim(varQuestionNO)
varPicture = varPicture & ".jpg"
Call MovePicS()
End Function
Function onPictureError(message)
MsgBox "Failed because " & message
End Function
Function MovePicS()
gfileSystem.root.getFile(PhotoName, {create: False}, gotFileEntryS, fail2)
End Function
Function gotFileEntryS(fe)
FileEntry = fe
FileEntry.moveTo(gdataDir, varPicture, SubSuccess2, fail3)
End Function
Function SubSuccess2(entry)
'MsgBox "Successfully Moved file from Cache:" & vbCRLF & PhotoName &
vbCRLF & "To Photos: " & varPicture
NSB.MsgBox("Press [SAVE ANSWER] to Complete Process...",0,"Photo
Successfull")
End Function
Function fail(error)
MsgBox "Error Getting File System: " + error.code
End Function
Function fail2(error)
MsgBox "Error getting: " + error.code + " --" + PhotoName
End Function
Function fail3(error)
MsgBox "Error writing: " + error.code + " -- " + varPicture
End Function
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]