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

File Upload Not Available on App Server

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

  • File Upload Not Available on App Server

    Hi All,

    I am on the Alpha subscription scheme and I have 2 App Servers.

    The File Upload\Download Features are enabled on one but not the other. Can someone tell me how to enable this feature on the second Server.

    Thanks

    Chris

  • #2
    Re: File Upload Not Available on App Server

    I have solved this myself as have discovered that the Upload and Download Features are not available in a Dialog.

    Thanks

    Chris

    Comment


    • #3
      Re: File Upload Not Available on App Server

      Chris,

      We should put an idea up on ideascale to add the "file upload user defined" to the dialog. I can understand not having the regular file upload there, but I would think they could add the user defined version... I need it too!
      Pat Bremkamp
      MindKicks Consulting

      Comment


      • #4
        Re: File Upload Not Available on App Server

        I didnt for one minute think about it being available or not. I have developed a dialog over the last couple of days so got a shock that I have probably wasted 2 days with it not being there.

        What is ideascale?

        Comment


        • #5
          Re: File Upload Not Available on App Server

          File upload existed long before any feature pack or new dialog. I will write one for the new dialog when I get a chance.
          Steve Wood
          Join the ALPHA DEVELOPERS NETWORK
          There is no Cloud. It's just someone else's computer.
          Web - Mobile - Hosting - Products - Frameworks - Developer Resources
          AlphaToGo | IADN (100% Alpha Anywhere Websites)

          Comment


          • #6
            Re: File Upload Not Available on App Server

            Is there anyway of providing an Upload through the Dialog the way A5 is at the moment.

            BTW Alphatogo has been very successful and the Portal has been running for a good 5 months with about 2000 users imported.

            Comment


            • #7
              Re: File Upload Not Available on App Server

              If you search the wiki for "Uploading Files to the Application Server" you will find the "old" way to do uploads. It will work from grid, dialog1, dialog2, a5w page.
              Steve Wood
              Join the ALPHA DEVELOPERS NETWORK
              There is no Cloud. It's just someone else's computer.
              Web - Mobile - Hosting - Products - Frameworks - Developer Resources
              AlphaToGo | IADN (100% Alpha Anywhere Websites)

              Comment


              • #8
                Re: File Upload Not Available on App Server

                Just an idea, had no chance to test it myself. Can't you use and embedded grid in the dialog and operate the file upload from that?
                Ger Kurvers
                Alpha Anywhere / V4.6.1.9- Build 6488
                Development: Mysql, windows 10 64 Applicationserver: standard on Windows server 2012 R2

                Comment


                • #9
                  Re: File Upload Not Available on App Server

                  Hi Pat,

                  I have found this post from your good self.

                  http://msgboard.alphasoftware.com/al...ghlight=upload

                  The problem I have is I know nothing about XBasic so don't really know how or where to use it.

                  Can you point me in the right direction. I have a button which I want the user to press which will take them to a single file upload that will be saved back to a sql 2008 table. Am I right in thinking that this is a linked file and not embedded.

                  Thanks

                  Chris

                  Comment


                  • #10
                    Re: File Upload Not Available on App Server

                    I thought that but didnt couldnt find how to attach a grid.

                    Of course a grid can be embedded - will try that.

                    Thanks
                    Last edited by Turnbullca; 04-12-2012, 06:08 PM.

                    Comment


                    • #11
                      Re: File Upload Not Available on App Server

                      Say, that Pat feller is pretty smart!

                      But not as smalrt as Steve...how do I do this in a Dialog2?

                      Here's a pic of what I'm trying to do. This is in a grid, but I don't need a grid because those boxes are multiselect dropdowns based on Filefind.get() so there is no table involved. That's why I want to use the dialog2. Next step is to add buttons to download files, move files from directory to directory and to delete files. Currently, there are about 900 of these projects, but potentially thousands next year!
                      screen1.jpg
                      Pat Bremkamp
                      MindKicks Consulting

                      Comment


                      • #12
                        Re: File Upload Not Available on App Server

                        Pat,

                        I know how smart Steve is - he has helped me a huge amount in the past and I use his ATG Template for the School Portal. The Security part of that template (especiallythe mass upload) has been fanatstic.

                        Anyway, I would be interested to know why Selwyn doesn't think that one would need an Upload feature in a Dialog2.

                        If you come across a solution please get in touch. I hope you find a solution soon to help you with your projects.

                        All I want to do is upload a file - why should that be so troublesome.

                        Good Luck

                        Chris

                        Comment


                        • #13
                          Re: File Upload Not Available on App Server

                          Here is some simple upload code. For a Dialog2 just add a Static Text control and stick this code in as the "static text". Although this is simple, I have same code also firing the image magic library to re-size images, etc. This same code without modification will work on an A5W page and in a grid using a freeform area.

                          <form action=" <%a5 ? request.script_name %> " method="post" enctype="multipart/form-data">
                          <input type="file" size=50 name="FileToUpload" >
                          <input type="submit" name="cmd" value="Upload File">
                          </form>
                          <%a5
                          if eval_valid("cmd")

                          '== determine where you want to save the upload
                          ' fldr = filename_decode(Request.ApplicationRoot) '== example - upload to application webroot
                          ' fldr = filename_decode("[PathAlias.ADB_Path]") '== example - upload to "data" folder
                          fldr = filename_decode("[PathAlias.ADB_Path]\uploads") '== example - upload to data folder + \uploads

                          '== store the full path and name of file
                          filename = fldr + chr(92) + FileToUpload.filename

                          '== deal with possible missing upload folder
                          if file.exists(fldr) = .f.
                          file.dir_create_recurse(fldr)
                          end if

                          '== deal with possible existing file (optional, the upload will always overwrite)
                          if file.exists(filename)
                          filename_bak = fldr + chr(92) + "bak_" + FileToUpload.filename
                          file.remove(filename_bak) '== must remove because "rename" below will not overwrite existing file
                          file.rename(filename,filename_bak)
                          end if

                          '== this saves the file to disk
                          if FileToUpload.filename <> ""
                          file.from_blob(filename,FileToUpload.data)
                          END IF

                          end if
                          %>
                          If you make this dialog a popup from another dialog or grid, then the Upload is in a nice popup window. You can add code to display a link to the file or image.
                          Steve Wood
                          Join the ALPHA DEVELOPERS NETWORK
                          There is no Cloud. It's just someone else's computer.
                          Web - Mobile - Hosting - Products - Frameworks - Developer Resources
                          AlphaToGo | IADN (100% Alpha Anywhere Websites)

                          Comment


                          • #14
                            Re: File Upload Not Available on App Server

                            Steve,

                            Thanks very much for doing this.

                            My users are actually mainly uploading PDF's, Word and Excel (so do not need resizing) which are embedded into a SQL 2008Table. Will I be able to use this code unedited with a Dialog that is bound to the table.

                            Once again thanks Chris you are a life saver.

                            Comment


                            • #15
                              Re: File Upload Not Available on App Server

                              Something to be aware of when writing file upload code is that the next patch will be introducing a new SaveToFile() method on the uploaded file. Using this instead of accessing the .Data property will prevent Alpha from having to load the uploaded file into memory first. The result is Alpha's memory footprint stays much lower () and the save completes much more quickly.

                              This new method is already in the prerelease, so if you are using a prerelease I recommend you begin using it in any new code. To do so, Steve's example code
                              Code:
                              if FileToUpload.filename <> ""
                                  file.from_blob(filename,FileToUpload.data)
                              END IF
                              becomes

                              Code:
                              if FileToUpload.filename <> ""
                                  FileToUpload.SaveToFile(filename)
                              END IF

                              Lenny Forziati
                              Vice President, Internet Products and Technical Services
                              Alpha Software Corporation

                              Comment

                              Working...
                              X