Thumbnail creation during Image Upload

In my application, I am able to upload documents to content server using KPRO API's.  Image upload works fine and I can display the same file in webdynpro image UI element. Now while uploading the image, i also need to create a thumbnail image and store it. I can use these thumbnail images for image navigation instead of actual file due to performance issues.
How to create thumbnail images from jpeg image file?
Edited by: ashwinsrinivas on Jul 20, 2010 8:41 PM

I'm trying to put the results of my tinkering into a blog - which should hopefully get published in the next few days.
But just to update you here first
Yes it can be done! - here's the proof:
[Large image about to be resize to a thumbnail|https://weblogs.sdn.sap.com/weblogs/images/251723740/large_double_rainbow.jpg]
[Image after resizing|https://weblogs.sdn.sap.com/weblogs/images/251723740/resized_rainbow.jpg]
Thought I'd go with some double rainbows to be topical (plus I can't get the darn song out of my head!)
I created a new method in Thomas' class: TRANSFORM_RESIZE with 2 input parameters of type i, new_width and new_height.
Then most of the code is pretty similar to the rotation code that Thomas had already written...
data l_data type xstring.
  data l_new_data type xstring.
  data l_row type xstring.
  data l_new_row type xstring.
  data l_num_pixels type i.
  data l_counter type i.
  data l_counter2 type i.
  data l_len type i.
  data l_pad type i.
  data l_mod type i.
  data l_width type i.
  data l_bytes_per_pixel type i.
  data: l_y_factor type f,
        l_x_factor type f.
  data l_new_pad type i.
  data l_null(1) type x.
* get the data from the image representation
  l_data = gx_content+data_offset.
  l_bytes_per_pixel = bpp / 8.
  l_width = width * l_bytes_per_pixel.
  l_y_factor = height / new_height.
  l_x_factor = width / new_width.
  l_mod = l_width mod 4.
  l_pad = 4 - l_mod.
  if l_pad = 4.
    l_pad = 0.
  endif.
  l_len = xstrlen( l_data ).
  data lt_rows type standard table of xstring.
  data: l_row_index type i.
  field-symbols <wa_row> like line of lt_rows.
  do new_height times.
    l_row_index = floor( ( sy-index - 1 ) * l_y_factor ).
    l_counter = l_row_index * ( l_width + l_pad ).
    append initial line to lt_rows assigning <wa_row>.
    <wa_row> = l_data+l_counter(l_width).
  enddo.
  l_mod = ( new_width * l_bytes_per_pixel ) mod 4.
  l_new_pad = 4 - l_mod.
  if l_new_pad = 4.
    l_new_pad = 0.
  endif.
  loop at lt_rows assigning <wa_row>.
    clear l_new_row.
    do new_width times.
      l_counter2 =  l_bytes_per_pixel * floor( ( sy-index - 1 ) * l_x_factor ).
      concatenate l_new_row <wa_row>+l_counter2(l_bytes_per_pixel)  into l_new_row in byte mode.
    enddo.
    if l_new_pad > 0.
      do l_new_pad times.
        concatenate  l_new_row l_null into l_new_row in byte mode.
      enddo.
    endif.
    concatenate  l_new_data l_new_row into l_new_data in byte mode.
  endloop.
  data x_new_image type xstring.
  concatenate gx_content(data_offset) l_new_data into x_new_image in byte mode.
  data x_header type xstring.
  x_header = gx_content+0(data_offset).
  data x_size(4) type x.
  data i_size type i.
  i_size = xstrlen( x_new_image ).
  write4 i_size x_size.
  concatenate x_header+0(2) x_size x_header+6 into x_header in byte mode.
  data x_data_size(4) type x.
  data i_data_size type i.
  i_data_size = xstrlen( l_new_data ).
  write4 i_data_size x_data_size.
  concatenate x_header+0(34) x_data_size x_header+38 into x_header in byte mode.
  data x_width(4) type x.
  data x_height(4) type x.
  data i_width type i.
  data i_height type i.
  i_width = new_width.
  i_height = new_height.
  write4 i_width x_width.
  write4 i_height x_height.
  concatenate x_header+0(18) x_width x_height x_header+26 into x_header in byte mode.
  data x_hres(4) type x.
  data x_vres(4) type x.
  x_hres = x_header+38(4).
  x_vres = x_header+42(4).
  concatenate x_header+0(38) x_vres x_hres x_header+46 into x_header in byte mode.
  concatenate x_header  l_new_data into x_new_image in byte mode.
  gx_content = x_new_image.
  me->read_bitmap_header( ).

Similar Messages

  • Error "A web exception has occurred during file upload" when trying to import ESXi image file into Update Manager

    I'm encountering this error and not sure how to fix, I'm quite new to vCenter so please bear with me.
    I'm trying out vCenter 5.1 with Update Manager 5.1 right now.  No license key has been entered and I still have 50 odd days to try it out.
    2 ESXi hosts are being managed by this vCenter, and they're both running ESXi 4.0
    I'm looking to use Update Manager to try to upgrade the ESXi 4.0 hosts to ESXi 5.1
    I downloaded the image file VMware-VIMSetup-all-5.1.0-799735.iso from VMWare website, and is looking to import it using the Update Manager so I can update the ESXi hosts, but I keep on getting the error:
    File name:     VMware-VIMSetup-all-5.1.0-799735.iso
    Failed to transfer data
    Error was: A web exception has occurred during file upload
    I tried importing it by using vSphere client to connect to vCenter server both remotely and locally, with firewall disabled.
    I've read http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1026602
    I've disabled firewall, and there is no anti-virus program on the server.  I've also restarted the machine several times, to no avail, I didn't reinstall update manager because the whole Windows and VCenter installations are clean from scratch.
    I logged into the vSphere Client using Active Directory credentials, and I've made all Domain Admins (which my account is a member of) part of the administrator group on the vCenter server. I can't log in using admin@System-Domain because it tells me I don't have permissions for it, I still haven't really had the chance to figure out why that is and not sure if that makes a difference.
    Also, I'm fairly certain I'm using the right image file, as I've burned some DVD's used that image file to upgrade some other ESXi hosts.  Unless there's a special image file I need to download?
    I'm at lost on what I can do to make it work.  Please advise.
    Thanks.

    The ISO file you mentioned is the one for vCenter Server. What you need is the "VMware-VMvisor-Installer-5.1.0-799733.x86_64.iso" (or VMware-VMvisor-Installer-201210001-838463.x86_64.iso) for the ESXi host.
    André

  • LR2 Crashes during SFTP / Web Image Upload

    Anybody else have LR2 crash during the image upload?
    I'm running 64-bit Lightroom 2 in 64-bit Vista Ultimate.
    When uploading using SFTP, LR2 will create the directories, but crashes during the image upload portion.
    I went back into the server settings and ONLY changed SFTP to FTP (passive is default) and clicked Upload again and it worked fine.
    I have used this server since LR1 and have not made any changes since prior to LR 1.4.1
    Anybody else tried SFTP yet?

    I'm running vista ultimate, intel e8500, 8gig ram, evga 8800GTS video. I can't get LR2 to start at all. It crashes every time I try to run it.

  • Custom Thumbnail Size(px) w/ADDT Multiple Image Uploader

    The standard thumbnail size that the Multiple Image Uploader generates is 150px x 100px
    I would like to know if there is any way to change that to 350 x 300?
    I am refering to the thumbnail that is generated and put into the
    thumbnails folder, not the thumbnail for the uploader itself :)
    Thank You!

    Hi Jason,
    this particular thumbnail size appears to be defined in the file "includes/tng/triggers/tNG_MImageUpload.class.php" -- here´s a function named "tNG_MImageUpload" with the following line:
    $this->showThumbnail(150,100,true);
    Guess you´ll have to change the thumbnail width-X-height values in here.
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Multiple Image Uploader renaming thumbnails

    I am having a blast with the ADDT! For a php noob such as myself this stuff is great, just what I have been looking for.
    If only I knew how to stop ADDT's multiple image uploader FROM RENAMING THE UPLOADED THUMBNAILS.
    Like this: myImage.jpg is renamed to myImage_135x150.jpg
    I can deal with it stashing the thumbnail in a separate folder, but the name of the uploaded image and the thumbnail must remain the same!
    I did manage to figure out where to change the thumbnails dimensions, but not the name itself...
    Thanks for such a great tool,
    Jason

    Hi Jason,
    ADDT´s default thumbnail renaming rule is defined in the file "includes/tng/triggers/tNG_DynamicThumbnail.class.php" -- at the end there´s a function named "Execute", and in here you´ll find the following:
    a) $thumbnailName = path_info['filename'].'_'.$width.'x'.$height.'_w_'.$hash.(isset($path_info['extension'])? '.'.$path_info['extension']:'');
    this needs to be changed to:
    $thumbnailName = path_info['filename'].$hash.(isset($path_info['extension'])?'.'.$path_info['extension']:' ');
    b) tNG_deleteThumbnails($thumbnailFolder, $path_info['filename'].'_'.$width.'x'.$height, $hash);
    this need to be changed to:
    tNG_deleteThumbnails($thumbnailFolder, $path_info['filename'], $hash);
    As always, please backup the original file before making such changes ;-)
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Problem: An error occured during the uploading process.

    Hello!  I've searched around but I am having difficulty finding a solution to this problem.
    I am trying to upload videos through Adobe Premiere Elements 9 to YouTube, using the preset options in the share tab.  This worked previously without issue, but then one day I continually ran into an error stating "Sorry, an error occured during the uploading process.  Please try again later."  However, it eventually started working.  It is now a few weeks later, and I am having the very same issue.  I am unable to upload to YouTube or any other service through the Share tab.  Even loading the software itself, the opening splash screen is unable to grab my Adobe ID.  It never stops "Gathering User Info..."
    Steps I have tried:
    Going to Edit -> Preferences -> Web Sharing and hitting the refresh button to update settings.
    Checked router settings.
    Enabled DMZ on router and linked it to this specific computer.
    Rebooted PC and router, and tried updating the Web Sharing settings multiple times.
    I honestly do not believe it to be a router issue, especially since it is currently in DMZ mode and I have had absolutely no trouble with any other software.  This has continued to baffle me though, and finding help is difficult.  Searches keep giving me encoding settings for YouTube videos, and few results pertain to this particular issue.
    I am aware I could export the video normally and upload through YouTube that way, but on DSL, my upload speed is pretty terrible for a high quality video.  The YouTube HD setting has been great for me in the past, as files are small but still look great online.  I would really like to get it working again, both for ease and convenience for simple projects.
    If anyone has any ideas as to what could be causing a problem, I would be greatly appreciative of any advice.  In regards to the project itself, there is no real editing being done at this point, as I am trying to eliminate any possibility of error elsewhere. I opened a new project, added a video clip and went directly to upload it, resulting in the error above.
    I don't believe it matters in this situation, but just in case:
    Windows 7
    AMD Phenom II X4 820 - 2.80 GHz
    6 GB RAM
    Radeon HD 5880 1GB
    Connecting through a Netgear WNDR3400 router, standard DSL connection.

    Sorry, not seeing where to edit my original post.
    Just wanted to add, that I am able to visit both the Photoshop.com website, as well as YouTube through my browser.  So I am not being blocked somehow to those particular sites.  It only seems to be through the software that I cannot connect to any of the online services to upload videos to.
    Additionally, the only virus software running is Microsoft Security Essentials.  It has never raised a flag before with this software or caused interference in the past.  I do not use Norton or any other service which are known to interfere with programs often.
    Just a quick example as well, pinging Photoshop.com through the command prompt shows I am getting through just fine.  As you can see in this image though, it cannot seem to ever connect and grab my user information.
    http://i.imgur.com/S53xN.png

  • ADDT multiple image upload: "error 500"

    Right now, I have managed to get the update record form wizard working, the right input ends up in the correct fields in the database.
    So I'm left fighting with the "multiple image upload", which gives me an "error 500" message (error connecting to server)
    The window does show me the correct files in the correct folder, but when I try and upload an image I always get the error 500 message.
    I have read that the "multiple file upload" uses a temporary folder, and Im assuming that the "multiple image upload" does the same, and I suppose that I should CHMOD that folder to 777.
    Do you know where I can find that folder?
    Can anyone help me with that error?
    Please?
    Sorry about my name, I tried a lot of other names, and all were taken, but this random name went just fine

    I thought it did - When I used the upload and save to database it saved the original images in a folder and created a sub folder called "thumbnails" and saved the thumbnails - origianl filesname just with width and height appended at the end.
    I checked my server files and their definately created.
    I browsed the java script and the help files which mentions it does this but I would like to be able to change the naming format of the thumbanils if possible

  • Multiple image upload CRASH!!! but works with simple image upload

    I'm getting MAD.
    I'm using php and GD
    While the simple image and re size works like a charm, the multiple image upload or the multiple file upload have a strange behavior.
    It opens the pop-up with flash, then eventually shows me files or thumbnails but when I try to up load I just wait and get the typical "system becoming unstable" flash error.
    As I can see the directory is always generated (I've tried also to put a static directory) but after stargin the upload the flash uploader just crashes and no result.
    Any help would be really appreciated

    Hi Fonzie,
    as the folder is getting created, the issue you´re having is not related to wrong folder permission - it´s something else...
    As I wrote before, che common upload and resize function works perfectly
    this one works perfectly, because it´s just one file to upload and to process, wheras doing that with multiple files might collide with some settings on your server
    So for sure it's not a simple issue as the max filesize
    Are you sure ? Did you check the current "max_upload_filesize" setting ? As long you don´t check it, you can´t know :-)
    As a general rule of thumb, it´s important to be aware of the fact that uploading & resizing images on the server might collide with several PHP settings -- and the more images you upload and resize in one swoop, the closer you´re getting to these limits respectively might even be exceeding them. The following "directives" are those which have an effect on whether your image/file upload & processing will work or not:
    - "max_upload_filesize" :: is sometimes set to just 8 MB on a shared hosting, sometimes 16 MB, sometimes more. This setting will affect the file upload procedure only
    - "set_time_limit" (e.g. 30 seconds) :: if the execution time of a script exceeds this limit for whatever reason, the server simply shuts it down without letting you (respectively the flash uploader) know it´s been shut down. This *might* be the reason why ADDT´s flash uploader hangs respectively returns that error message after some time, because it´s waiting for some response from the server which never comes.
    - "memory_limit" (e.g. 8 MB) :: this directive is a sort of "allocated server RAM" for your account, and it´s in particular the image resizing process which will grab more or less memory resources -- the higher the the resizing factor is, the more RAM is spent, and the more images are getting resized in one swoop, the worser it gets.
    However, all these PHP directives can be changed, and your host might even be so courteous to increase the currently defined values of those abovementioned directives for you -- and that´s what I´m suggesting at this point.
    Cheers
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Problem in Image uploading through a view -- URGENT

    Hii Experts,
    I am facing very strange problem while uploading a image file (.JPG file) thru a web dynpro view.
    I am accepting a image file from view and uploading it to a ftp server.
    There are two abnormal results I have observed. It does NOT  happen for every image upload. But it has been observed to happen during peak Internet hrs. (image size can range from 1MB to 7-8 MBs)
    When 'Upload' button is clicked, one of the following thing happens:-
    1.  After taking loooong time (processing circle rotates), browser screen goes totally blank. That is, browser goes into state as if no page is opened (white screen)
    2. After taking loooong time, empty form re-appears. ( ie the view in which i had submitted data and pressed 'Upload')
    I have tried tracing errors in default trace. but no error or exception is displayed !!!
    Following is the code i'm using for uploading file. ==>
    try {
    URL myUrl = new URL("ftp://<some address>");
    FtpURLConnection myConnection = new FtpURLConnection(myUrl);
    myConnection.connect();
    OutputStream out = myConnection.getOutputStream();
    out.write(wdContext.currentPhotosElement().getPhoto1());
    out.close();
    myConnection.close();
    } catch (Exception e) {
    System.err.println("\n\n$$$$$$$$$$$$$Exception in image upload $$$$$$$$$$$$$\n\n");
    e.printStackTrace();
    Please help me as this system is live and lot of users are complaining as they are not able to upload their images..
    Awaiting for reply ..
    regards,
    Amey
    Edited by: Amey Mogare on May 28, 2008 2:14 PM
    Edited by: Amey Mogare on May 28, 2008 2:17 PM

    In SE78 when we click on the graphics and then click on the BMAP ( Bitmap Images ) then the bdc is not cathcing the screen and its giving an error
    This is the error message which i am recieving in it .
    00 343 S Cursor field RSTXT-TDNAME . does not exist in the screen
    Please suggest me that is there any way for the same or else is there any BAPI for the same .
    Regards
    Shankar

  • Image Upload probelm - Very Urgent. Pls help!!!

    Hi All,
    I am facing very strange problem while uploading a image file (.JPG file) thru a web dynpro view.
    I am accepting a image file from view and uploading it to a ftp server.
    There are two abnormal results I have observed. It does NOT happen for every image upload. But it has been observed to happen during peak Internet hrs. (image size can range from 1MB to 7-8 MBs)
    When 'Upload' button is clicked, one of the following thing happens:-
    1. After taking loooong time (processing circle rotates), browser screen goes totally blank. That is, browser goes into state as if no page is opened (white screen)
    2. After taking loooong time, empty form re-appears. ( ie the view in which i had submitted data and pressed 'Upload')
    I have tried tracing errors in default trace. but no error or exception is displayed !!!
    Following is the code i'm using for uploading file. ==>
    try {
    URL myUrl = new URL("ftp://<some address>");
    FtpURLConnection myConnection = new FtpURLConnection(myUrl);
    myConnection.connect();
    OutputStream out = myConnection.getOutputStream();
    out.write(wdContext.currentPhotosElement().getPhoto1());
    out.close();
    myConnection.close();
    } catch (Exception e) {
    System.err.println("\n\n$$$$$$$$$$$$$Exception in image upload $$$$$$$$$$$$$\n\n");
    e.printStackTrace();
    Please help me as this system is live and lot of users are complaining as they are not able to upload their images..
    Awaiting for reply ..
    regards,
    Amey

    Hi,
    Does anybody have any idea about how the file data (byte stream) flows from Client's machine browser to Web Dynpro's context's element??
    As per my observation and tracing, it is first loading byte array frm client's machine to view's corresponding context node.. And then only it is proceeding with further actions.
    Now in my case, user may upload files ranging frm size 6MB to 10MB, web dynpro application either refreshes or times out during this transfer. I didnt even started FTP process to upload byte[] to remote server !!!
    So how can we increase this speed of transfer from  client's machine to context element ??
    regards,
    Amey

  • Multiple image upload with save to database problem

    I am developing some backend work for a client, and we recently used the Multiple image upload with save to database wizard without a problem. A few days later, we noticed that we could only upload a single file at a time - it seems that the coding is no longer able to access the flash part of this and is using the javasript function instead. I know the web hosting company has made some changes on the server, and I did some reearch and it seems that  there could be an issue with Flash 10, but has anyone else experienced anything like this? Any help is greatly appreciated.
    Thanks.
    Jeremy

    Thank you for the responses. I have already updated awhile ago, so I am wondering what happened. Not sure if during the server update, some files were replaced (unless I totally forgot to update to 1.0.1 on this site). So I reinstalled 1.0.1, deleted the includes folder from the server and uploaded my includes folder and it now works again.
    Again, thanks for the help.
    Jeremy

  • Multiple image upload with save to database wizard problem

    hi,
    i need to upload multiple images (6) in a table called pictures. i will need the names stored in the database and the files uploaded on the server. since i am new to dreamweaver i can not figure out on how to make this work.
    the multiple image upload wizard uploads the images fine and creates a subfolder with the right id but i have no file names in the database at this point. i tried the multiple image upload with save to database wizard but i only get one upload button. it worked fine with one image but i need 6 pics uploaded. the i tried to first upload the pictures with the multiple image upload wizard and use the update wizard to add the names afterwards but that did not work either. hmm. would be great if someone could help me out.
    thanks, jan

    Thank you for the responses. I have already updated awhile ago, so I am wondering what happened. Not sure if during the server update, some files were replaced (unless I totally forgot to update to 1.0.1 on this site). So I reinstalled 1.0.1, deleted the includes folder from the server and uploaded my includes folder and it now works again.
    Again, thanks for the help.
    Jeremy

  • Has anyone been able to upload an ibooks file with audio only files (m4a) in it? I keep getting the following error message during the upload in iTunes Producer: ERROR ITMS-9000: "Files of type audio/x-m4a are not allowed outside of widgets.

    Has anyone been able to upload an ibooks file with audio only files (m4a) in it? I keep getting the following error message during the upload in iTunes Producer: ERROR ITMS-9000: "Files of type audio/x-m4a are not allowed outside of widgets. then it names the file as an m4p file. Everything works beautifully on the iPad through Preview, and validates through iTunes Producer up until the attempted upload. If you've been able to accomplish this, please let me know how you prepared your audio files. Many thanks.

    Hello Fellow iBook Authors!
    Today I received the same error that you all have been discussing.  I tried selecting the DRM
    and this did not work for me, though I'm glad it did for some.  Here's what I did as a work-around. . .
    Since iBooks Author did not have a problem with Videos, I simply used one of my video programs, ScreenFlow to turn the audio into a video file m4v.  I added an image and extended the length or timing of the image to span the length of the audio file.  Then exported as an .mov.  I then opened QuickTime and opened the file and exported the file to iTunes. 
    You can use iMovie, Camtasia or any other progam that will allow you to export the audio as a movie file.  Does this make sense?  I hope this helps, at least in the short-term.
    Michael Williams

  • Multiple Image Upload and watermarking

    Hi,
    I am using a gallery script which takes main images from a dynamic folder and creates thumbnails on the fly.
    It gets the main images dynamically from
    $config['fulls'] = $_GET['imgfolder_id'];
    Then GD is applied to create thumbnails on the fly. There is no GD role for the main images. I use lightbox to show pop-up image. And the images are uploaded to a dynamic folder using ADDT multiple image upload server behavior.
    My requirement: want to apply water mark on the large (pop-up) image. Not on the thumbnail.
    Is it possible to have the water mark applied at the time of Multiple Image Upload?
    Thanks for any help
    Jay

    Hi Jay,
    if it were a single image upload, I would have suggested to apply a PHP watermark script to the uploaded image by embedding that code in a Custom Trigger, type AFTER -- but as the multiple upload gets proceeded by a flash file, I have no clue how to do that.
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Image upload question

    Hi all,
    I've got an image upload section for an admin page.  I've tried countless tutorials, but I just can't seem to get anything to work the way I want it to.  I'm trying to resize the uploaded image to a specific size (w=215; h=250) and maintain the transparency of the png file.  All I can get to work is a simple upload that does not resize.  So far I've got this:
    $current_image=$_FILES['image']['name'];
    $extension = substr(strrchr($current_image, '.'), 1);
    if ($extension != "png")
    die('Unknown extension');
    $new_image = $current_image;
    $destination="../../assets/subfolder/".$country."/".$new_image;
    $action = copy($_FILES['image']['tmp_name'], $destination);
    if (!$action)
    die('File copy failed');
    }else{
    Can anyone please help me get this to resize and keep the transparency?  Or point me in the right direction where I can find a tutorial that I can get to work?
    Thank you very much.,

    My book, PHP Solutions, 2nd Edition, devotes an entire chapter to generating and uploading thumbnail images. It's not free, but it might help you if you're stuck.

Maybe you are looking for

  • Network setup app is missing from the marketplace

    Hi Nokia network setup app is missing from Nokia lumia 710 marketplace Please help me ..... I am unable to run internet on my phone

  • WRTSL54GS - Internet suddenly unavailable (internet light also out)

    Accessing the internet through my router no longer works. I've tried connecting my computer directly to the cable modem, and the internet works fine (as I am using it right now to write this message). I use the same cable (as well as other ethernet c

  • Business View Connector Error When Developing from Client PC

    We upgraded from CE10 to BOXI 3.1 using Crystal Reports 2008 with Business Views.  Now when developing a report using a BV working in Crystal Reports 2008 on the server on which the BV resides all works fine; when we use Crystal from a client PC and

  • Re: Complaint over poor customer service - Broadb...

    i ve ordered my bt infinity on 19th march and gave my mac code to bt on 21or 22 nd of march and told that engineer will be at my address on 29th.. i was happy.unfortunatly noone turned up on 29th and i phoned bt.. first person i talked to said that i

  • Firefox preview loop of SHTML files

    OK, got one I have not ever seen before and cannot find any solutions for. Suddenly, and with no changes to firefox or dreamweaver, when I create a .shtml file and try to preview it in firefox, I get an endless loop of tabs as though it is trying to