Add attachment without form node

7345
11
Jump to solution
09-02-2014 11:58 AM
IsaiahAguilera
Occasional Contributor II

I have a mobile phonegap application that has access to the devices camera.  I am trying to take a photo and use the addAttachments method to upload the selected captured image.  My problem is this method only allows for a input type file as the source.  Unfortunately phonegap does not support input file types and I have to upload the captured image directly.  Is there a way to add attachments without using the form type input.  Any help would be greatly appreciated.

0 Kudos
11 Replies
JohnGrayson
Esri Regular Contributor

Isaiah,

     glad to hear you got it working.  I believe some of these classes are newer functionality that might not be available on older browsers, so please make sure your target browser(s) will support them.

good luck,

John

Wee_LikLau
New Contributor III

HI Isaiah,

I manage to get the solution work in phonegap.

But in order to get it work with older webkit such as Jelly bean & before, I have to switched to blobbuilder instead of blob construct.

And replacing blobbuilder to blob, I keep getting "internal server error" log from my arcgis server manager when attempting to addattahcment.

I checked the files in arcgisuploads > scratch folder and fould out that the file size is 0KB, with name of {fileid}.uploads.

Anyone got any ideas on this?

Does this mean the files is corrupted ?

I can still see/view the files that are uploaded successfully with blob construct.

thanks,

0 Kudos