Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Image Upload/PhoneGap

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Image Upload/PhoneGap

    I am trying to do an image upload to a mysql table using phonegap

    My Ux component image upload settings are:
    PhoneGap build project settings.PNG

    My Ux Component image upload settings:
    Image upload setting.PNG

    The alpha anywhere version 12.4.3.1, Build 3962

    The phonegap version is 6.3.0

    On an android phone running version 4.2.2, It brings up the camera but after I take a photo , the camera action is cancelled with message "error capturing image"
    On an android running phone version 6.2.2 I am able to take the pic but after about 2 seconds an alert is shown "Image Upload failed"

    Any Suggestions?
    Attached Files

  • #2
    Re: Image Upload/PhoneGap

    Is your File Transfer plugin set specifically to version 1.5.1? Check the current set of release notes for more info on this.

    Comment


    • #3
      Re: Image Upload/PhoneGap

      yes it is in xml file but still no success. I did see that in the release file and checked to make sure it was set.

      Comment


      • #4
        Re: Image Upload/PhoneGap

        Your UX component security (if security is on) is set to always allowed
        Your UX is published
        Your URL for Ajax Callbacks is set correctly

        I just rebuilt a UX I had for testing Image Upload and used the same settings you're showing and it works. Update images and add new images.

        Can you post your UX? Or a sample UX?

        Comment


        • #5
          Re: Image Upload/PhoneGap

          I back checked and the following are checked:

          Your UX component security (if security is on) is set to always allowed
          Your UX is published
          Your URL for Ajax Callbacks is set correctly

          Attached is a copy of my project.
          Attached Files

          Comment


          • #6
            Re: Image Upload/PhoneGap

            Is your Alpha Server at the same Build... 3962? It looks like this is a server issue. The error occurs after the server call is made to the component to save the image.

            Comment


            • #7
              Re: Image Upload/PhoneGap

              It was but I already downgraded to 3922 but still no success.

              Comment


              • #8
                Re: Image Upload/PhoneGap

                But both your Dev Env. and Server are the same build... right?

                It looks to me like several issues going on. First, you used PumpJackPro as a template... that's a huge issue although it's probably not the cause of your image upload problem. But is it something for a later discussion.

                Your Server-side onDialogInitialize event is broken because it is mis-named. You have...

                ExecuteServerSideAction("Get Primary Keys for Parent Table::Load_Primary_keys_for_Parent_Table") but no such action exists.

                The action name is...

                Load_Primary_keys_for_Parent_Tab

                So the action call should be...

                ExecuteServerSideAction("Get Primary Keys for Parent Table::Load_Primary_keys_for_Parent_Tab").

                Next, although not horrible... your Data Binding SQL connection string is actually the connection string. Change it to use your named connection string. Using it the way you have it is like hard coding your connection. It's like a hold you pre-dig to fall into later.

                Next, I'm not sure that you're actually Data Bound to your Controls. Check the "Bind UX Component Controls to Table Fields" in Data Binding. When I checked nothing was bound. That may have been because I changed the connection string to use a named connection... but check yours.

                Doing all this, with your table in my local SQL Server... a rebuild of the app works... no issues with image upload.

                You're also using Container on-click events... I don't understand why you'd do that.

                Comment


                • #9
                  Re: Image Upload/PhoneGap

                  Both server and development are running the same build 3922

                  When I put ExecuteServerSideAction("Get Primary Keys for Parent Table::Load_Primary_keys_for_Parent_Tab") on the dialogload component I get "no no such action exists"

                  I have made the other changes as you have suggested but still not able to save the image

                  See attached project with changes
                  Attached Files

                  Comment


                  • #10
                    Re: Image Upload/PhoneGap

                    I'm assuming you changed the table id from SITET_id to SITETRACKING_ID. The original table you sent had SITET_id.

                    Another change you should make is in the Alpha PhoneGap Build Builder. Your current Application Id is a5w.http://www.ssbeservices.net/8080.login and it should be something like net.ssbeservices.sitetracker.

                    Attached is a new component. Go back to basics and see if this component works. Once you have this component in your project remember to set it's security to Always Allowed and publish it. Then open your Alpha PhoneGap Build Builder and change the UX Component.

                    Once built and installed, make sure you can navigate the records. If so, then try an Image Upload.

                    I think, overall, this is an issue with your server. Also attached is your pumpjackprossb component. There are a few other changes you need to make.

                    In your Javascript Functions you're testing the platform using this...

                    document.addEventListener('deviceready', function() etc.

                    But you don't need, or want, to do this. Delete this code and in the Client-side event onPhoneGapReady put this code...

                    Code:
                    var platform = device.platform;
                    switch (platform){
                    	case "Android":
                    		break;
                    	case "iOS":
                    		StatusBar.hide()
                    		break;
                    }
                    And... because you're using "device" you need that plugin... so in the Alpha PhoneGap Build Builder, turn on the Device plugin.

                    The changes I made to your setup were:

                    The "addEventListener" stuff
                    Turning on the Device plugin
                    Pointing the Ajax Callback URL to my server
                    Changing the Application Id

                    I think it's your server setup that's causing the issue.
                    Attached Files

                    Comment


                    • #11
                      Re: Image Upload/PhoneGap

                      I am not sure what's happening. I followed all of your instructions.
                      I also loaded the two components you sent me but i still get the error message image upload failed.
                      I am lost. I am using the same build on the server and development. Is there a particular build that it definitely works on or is
                      there any specific server configuration that needs to be done?

                      I really wanted this to work, I have been at it for sometime.

                      Comment


                      • #12
                        Re: Image Upload/PhoneGap

                        Can you navigate through the records in the test component?

                        Comment


                        • #13
                          Re: Image Upload/PhoneGap

                          yes, I am able to navigate through the test records and the images are shown.

                          Comment


                          • #14
                            Re: Image Upload/PhoneGap

                            That you can navigate through you records is a good sign. Communications to your server and data are open. I can't think of why the image update is failing.

                            Comment


                            • #15
                              Re: Image Upload/PhoneGap

                              I am not sure what is happening either. I can save data to the table and if I run the application in a web browser it works fine. The images get uploaded.

                              Comment

                              Working...
                              X