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

How do you prevent Publish from deleting data folders?

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

    #16
    Re: How do you prevent Publish from deleting data folders?

    disclaimer: i do not have version 12 to know the nuances or IIS integration.
    but if you read this article it says it is a known issue where all subfolders are deleted when publishing to the webroot, and they say republish the subfolders. is this article applicable in your case?
    https://github.com/alphasoftware/Alp...here/issues/15

    the article mentions sub applications but the concept is what i am referring to, deleting subfolders.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    [email protected]
    Skype:[email protected]
    1 914 924 5171

    Comment


      #17
      Re: How do you prevent Publish from deleting data folders?

      Yes, Gandhi, that's exactly what my issue is. Although I'm not using sub applications, I'm storing user-uploaded data files on the server in an "uploads" folder under my webroot. Therefore, whenever I republish, the uploads folder gets removed, even though I don't have an uploads folder in the web directory structure on my local machine. When testing and republishing locally, the uploads folder does not get erased. Thanks for finding this! I wasn't able to locate any references to this issue on the Alpha site.

      In order to get around it, then, it looks like I need to use an "uploads" folder on the server that is outside the webroot. This works fine when accessing user-uploaded image files from a list control, but the Image Gallery component cannot seem to access them if they are outside webroot. It looks like it can read the directory structure but not open the files, even though I have set permissions to full control on the uploads folder. I know I can write my own "image gallery" using list controls, but am not sure what other issues I will face having the image files outside of the webroot.

      For example, and I have never done this yet, but need to include user-uploaded image files in the body of an email that I generate within my app. At this point, my understanding is that any images I include in the body of an email need to reference a URL within my website. Is that correct? I know I can include the actual files as attachments, but need to show descriptive information along with the images in the email body. And I don't yet know much about generating reports that would include the user-uploaded images.

      Do you have any further thoughts or design considerations on this? Many thanks for your help and insights on this!

      Comment


        #18
        Re: How do you prevent Publish from deleting data folders?

        Do you have any further thoughts or design considerations on this? Many thanks for your help and insights on this!
        disclaimer: i do not have version 12 to know the nuances or IIS integration.
        sorry.

        but.. i think your email can include files from outside of the webroot, if i am not mistaken.
        how are you sending the email? xbasic or actionscript?
        thanks for reading

        gandhi

        version 11 3381 - 4096
        mysql backend
        http://www.alphawebprogramming.blogspot.com
        [email protected]
        Skype:[email protected]
        1 914 924 5171

        Comment


          #19
          Re: How do you prevent Publish from deleting data folders?

          Creating and sending via xbasic...
          Can I embed a base64-encoded image in the email body, perhaps using something like the file_to_blob function? I haven't looked at that as an option yet, because I already had it working by including the image by referencing its URL. When the uploads folder was under the webroot, that worked great. Now that it's elsewhere on the server, I may have to do it another way...
          Thanks!
          Last edited by pcsystems; 05-03-2017, 05:38 PM.

          Comment


            #20
            Re: How do you prevent Publish from deleting data folders?

            i think you can, you said these pictures are taken via phone device and uploaded to sql server, either in this thread or another one of yours. then the image is stored as base64 encoded string. you should be able to send something like
            image src = "data:image/png;base64," + your base64 string
            or file_to_blob function may work better.
            i send images via email, but they are stored as images not base64. in my web browser program and
            i view my images in iphone app using base64. i will see how i did it and post later on if something i find that you can use it.
            thanks for reading

            gandhi

            version 11 3381 - 4096
            mysql backend
            http://www.alphawebprogramming.blogspot.com
            [email protected]
            Skype:[email protected]
            1 914 924 5171

            Comment


              #21
              Re: How do you prevent Publish from deleting data folders?

              when i view my image in my phone app ( not using alpha 5) i use
              <img src = "data:image/jpeg;base64, my_base64_string">
              i cannot tell this will work on an email, since i haven't done that.
              thanks for reading

              gandhi

              version 11 3381 - 4096
              mysql backend
              http://www.alphawebprogramming.blogspot.com
              [email protected]
              Skype:[email protected]
              1 914 924 5171

              Comment


                #22
                Re: How do you prevent Publish from deleting data folders?

                Thanks, Gandhi. I pretty much did that but the image will not appear in the email body. I attach the actual files to the email as well and that works fine. But the base64 version of the image files does not appear in the table...just blank space with a frame around it. I understand you haven't done this before so I will try looking for other threads about it or start a new one I guess. Just in case, I attached the code I use to generate a simple email that displays the images and their descriptions. The descriptions appear just fine. I appreciate the time you spent looking at this!

                My email code.txt

                Comment


                  #23
                  Re: How do you prevent Publish from deleting data folders?

                  fblob = file.to_blob(ContentFile)
                  html_message = html_message + "<td><img height=100 src=" + chr(34) + "data:image/jpeg;base64," + base64encode(fblob) + chr(34) + "/img></td>"
                  this is confusing me.
                  you have the data in the sql, is that not base64 code?
                  and img tag contains additional quote marks in the form of chr(34) and the first img does not have an ending ">" and the height is not enclosed in quotes
                  Code:
                  "<td><img height=\"100\" src = \"data:image/jpeg;base64," + base64encode_string_fromsql + "\"></td>"
                  is this not the way to do?
                  Last edited by GGandhi; 05-04-2017, 07:27 AM.
                  thanks for reading

                  gandhi

                  version 11 3381 - 4096
                  mysql backend
                  http://www.alphawebprogramming.blogspot.com
                  [email protected]
                  Skype:[email protected]
                  1 914 924 5171

                  Comment


                    #24
                    Re: How do you prevent Publish from deleting data folders?

                    Thanks, Gandhi. The image filename is stored in the SQL database, not the base64 encoded value. That's why I am reading it into a blob and encoding it for the img tag. And, yes, it looks like I did have a syntax error in the img tag itself. However, even when I changed the code as you indicated, it still didn't show an image in the email body. This is what I tried:

                    fblob = file.to_blob(ContentFilename)
                    html_message = "<td><img height="100" src=data:image/jpeg;base64," + base64encode(fblob) + "></td>"

                    I did find, however, that if I use the URL for the image in the email, it does display properly in the email body. For example, if I set src="http://www.mydomain.com/uploads/<imagefilename>", it works fine. So that brings me back to my original issue: if publish erases my webroot, and specifically the uploads folder every time, how can I store dynamic data, like user-uploaded images, under webroot? I can access them in emails and with Image Gallery, but they will always get wiped out during the publish step. Should I try storing the base64-encoded version of the images in my SQL tables? Is there a lot of overhead involved with doing that? And, if I go that route, can I display those images in the body of an email? And also, I would need to write my own Image Gallery process. Just thinking out loud and trying to figure out how to proceed from here. Thanks again for your help!

                    Comment


                      #25
                      Re: How do you prevent Publish from deleting data folders?

                      if that's the case can you try
                      Code:
                      html_message = "<td><img height=\"100\" src=" +./uploads/imagefilename+"></td>"
                      or correct the path.

                      edit: the a5w pages and the webserver can read outside of the webroot. so you can store in a different folder and send it via email.
                      Last edited by GGandhi; 05-04-2017, 06:16 PM.
                      thanks for reading

                      gandhi

                      version 11 3381 - 4096
                      mysql backend
                      http://www.alphawebprogramming.blogspot.com
                      [email protected]
                      Skype:[email protected]
                      1 914 924 5171

                      Comment


                        #26
                        Re: How do you prevent Publish from deleting data folders?

                        This worked, Gandhi! By including the full URL of the image in the email body, it displays properly! Now, I just need to figure out how to move the uploads folder outside of the webroot and get access to it. I know you said you don't have V12 to know the nuances or IIS integration, but I wasn't sure if you are using IIS at all? I'm thinking a virtual directory is the answer to that.

                        Also, the email feature works properly on my development PCs but not on the server. I'm thinking I need to install and/or enable an email service there. I was using the built-in Alpha email functions but don't know if they work/don't work on a standalone IIS server. Do you know?

                        Thanks for all your patience and help walking me through this!

                        Comment


                          #27
                          Re: How do you prevent Publish from deleting data folders?

                          1> you should go to project properties and fill in the information for email there so that email will work on the server too. ( at least in version 11, ther should be something similar in version 12) ( this is in addition to view-settings-email)
                          see here:
                          https://www.screencast.com/t/gq7Ue4PpQg

                          2> create a folder in your server for example c: \rudik\uploads. then upload images there. then in the email you simply add full path as
                          Code:
                          <img src = "c:/rudik/uploads/image_file_name" height = \"100\">
                          thanks for reading

                          gandhi

                          version 11 3381 - 4096
                          mysql backend
                          http://www.alphawebprogramming.blogspot.com
                          [email protected]
                          Skype:[email protected]
                          1 914 924 5171

                          Comment

                          Working...
                          X