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

Problem viewing images

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

  • Problem viewing images

    Hi all,
    I've read and read again the various threads on publishing images to the server, but can't seem to get it right...can someone put me straight please?

    I have a local PC where the images are in c:\images
    My Alpha database is in C:\Batches\
    I have a Alpha database table (HPBatches) with an image file reference field (called batchphoto) and I've set the image associated with each record in that table in the (desktop) table (therefore the value in the one of the records' batchphoto fields would point to c:\images\batch1.jpg, or c:\images\batch2.jpg, for example)

    All works well.

    I've created a webproject and a grid based on my HPBatches table and included the batchphoto field, published the table to the local webroot - and the images display ok.

    However, when I publish the project to my network server, the grid and data shows up ok, but the image field just says 'image not found'.

    As I said I've read the other threads on the forum, plus looked at the help, but can't seem to relate them to my situation (I think I'm confusing myself !)

    The published database is on the server's F:\ drive in F:\A5webroot,
    The data is in F:\HPdata

    Do I need to copy (ie using windows explorer) the images folder from my C:\ drive to the server's F:\ drive? or does the publishing process also magically copy the images to the server too?

    I understand that I need to create a pathalias for the images before publishing again which will tell the published grid where to find the images on the server.
    The desktop database has the images referenced to c:\images, so how do I tell the batchphoto grid field in the application published on the server to look in a different location (say F:\HPimages)?

    Sorry if this has been asked before, but I just can't seem to 'get it'.

    TIA,
    Rich

  • #2
    Re: Problem viewing images

    Hi,
    I solved this now. I don't know if its the 'best' way, but I just decided to simplify things.

    1. I changed the location of the images on the local (development) pc so they were stored in a subfolder of the actual database (C:\HPBatches\HPimages).
    2. Changed the value I'd put in the grid image fields' 'image path' to the standard "PathAlias.ADB_Path"
    3. Copied (with explorer) the image files from the local machine to a subfolder of the published data and gave it the same name as that on my dev PC (F:\HPData\HPimages).

    The images now display ok....but it was hard work !
    I guess it now works because the images are stored in the same relative location on the server as when they are on my local dev pc.

    I was hoping that the publishing process would also copy the image files from my local dev PC into the new folder on the server, but it looks like I'll have to copy them there manually...unless someone can tell me a better way???

    Thanks,
    Rich

    Comment


    • #3
      Re: Problem viewing images

      The way you are doing it is find for Image Reference Fields. Using the IRF, the image can be anywhere on the drive. Another way, the more 'normal' way when it comes to the web is to include the images in the document root, not stored in the data path, not referenced with PathAlias.ADB_Path, and not using an Image Ref Field. Most then put the images under an Images folder off the document root. You would use normal character fields to store the image name. Or, like almost all of my apps, you tie it to the unique key for your table - so if my record has a primary key value of 10001, the image might be named 10001.jpg, and the thumbnail if desired, named 100001_th.jpg. Then there is no reason to have a field to store the image name, as it is derived from the primary key value.

      The IRF method you are using is requried if a) you need your images to be hidden from public (outside of the document root) and/or b) made part of an Alpha-based Report viewed on the web. Alpha reports require the image to be in an IRF (although I am searching for a method to get around this.)
      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


      • #4
        Re: Problem viewing images

        C:\Batches\images\then\any\folders\under_images

        e.g.

        c:\batches\images\logo
        c:\batches\images\thumbs
        c:\batches\images\large_images\big_images

        will all work.


        \Batches is also where the database is located and your data files. Under this setup you need publish nothing other than your apps.

        IRF have had MAJOR work done - I'm a real fan now. with the Ajax load, they are basically instant.
        Insanity: doing the same thing over and over again and expecting different results.
        Albert Einstein, (attributed)
        US (German-born) physicist (1879 - 1955)

        Comment


        • #5
          Re: Problem viewing images

          Thanks for your help Steve and Peter, much appreciated.
          Steve, the scenario you mentioned (having the images hidden from public and wanting to put them on a report) - are both things I need - so I guess I was lucky doing things this way.
          The next thing I need to do is get the images to show up in a pdf report and be printed by the user clicking a 'print document' button or link on a grid - I'm looking through the help sections and this forum and it looks like I've got a lot of reading to do ;-)

          Thanks again.
          R

          Comment


          • #6
            Re: Problem viewing images

            Hello All

            I am having exactly the same problem as Rich did and have tried all the options mentioned in this thread but to no avail. I have the belowmentioned code in my web page:

            <img src="C:\A5Webroot\Test\speeding%20train.jpg">

            and have tried other locations, but the image only shows on my PC. None of my users can see the image. I tried using the <object> tag instead but the web browser doesnt appear to like that

            Can anyone provide some guidance please?

            Many thanks

            Jason

            Comment


            • #7
              Re: Problem viewing images

              Your images do not go in the webroot, they are in the same folder as your database on the server, image reference files do not get published, they get viewed just like your other data in the table, so..

              if your database is in c:\projects\sample

              then

              your image folder will be c:\projects\sample\images

              your image reference fields will point to this folder.

              Nothing else to do.

              IT DOES NOT GO IN THE WEBROOT..

              Cheers.
              Last edited by peteconway; 09-29-2009, 05:51 AM.
              Insanity: doing the same thing over and over again and expecting different results.
              Albert Einstein, (attributed)
              US (German-born) physicist (1879 - 1955)

              Comment


              • #8
                Re: Problem viewing images

                Hi Peter

                Thanks for your reply. I meant to say that I have my alpha front end connected to a sql server db, so when you say where my dbase is, I assume for me that is where the active tables are sitting?

                Cheers

                Jason

                Comment


                • #9
                  Re: Problem viewing images

                  What ever folder your .adb file is in make a folder called images.
                  Copy a sample image into that folder.
                  Make a single sample .dbf table put nothing it it other than one image (use the sample image you put in ..\images\imagename.jpg) in the reference field.
                  At table level right click the image and check the path is as you selected.
                  Make a grid, use the sample table, select the image reference field.
                  Save the grid.
                  Preview the Grid.
                  The image should show.
                  Publish the grid.
                  The image should show.
                  If not get back to me.
                  Insanity: doing the same thing over and over again and expecting different results.
                  Albert Einstein, (attributed)
                  US (German-born) physicist (1879 - 1955)

                  Comment


                  • #10
                    Re: Problem viewing images

                    cheers Peter, will do

                    Jason

                    Comment


                    • #11
                      Re: Problem viewing images

                      Hi Peter

                      Thanks very much, got that one working!

                      Have a great day

                      Jason

                      Comment


                      • #12
                        Re: Problem viewing images

                        Same to you - it is a little difficult to get the concept, but it works well and makes life a lot easier down the track with images in PDF' reports etc.

                        Well done.
                        Insanity: doing the same thing over and over again and expecting different results.
                        Albert Einstein, (attributed)
                        US (German-born) physicist (1879 - 1955)

                        Comment


                        • #13
                          Re: Problem viewing images

                          Having similar problem publishing to remote server for first time and getting my images folder to get copied to remote server. I am using the image reference field method.

                          Local computer:
                          C:\a5v10\mydatabase
                          C:\a5v10\mydatabase\images

                          Remote server:
                          c:\a5v10\a5webroot
                          c:\a5v10\data

                          a5w pages, etc are getting into c:\a5v10\a5webroot
                          data files are getting into c:\a5v10\data

                          Images folder not being copied

                          When I have a choice to select which data files to copy, I cannot select the images folder.

                          Thanks

                          Comment


                          • #14
                            Re: Problem viewing images

                            As it's not part of the database you will need to ftp the images folder to the server. make certain it's in the sample folder.
                            Insanity: doing the same thing over and over again and expecting different results.
                            Albert Einstein, (attributed)
                            US (German-born) physicist (1879 - 1955)

                            Comment

                            Working...
                            X