Re: Images do not upload completely ...

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 51244
interpreted = N
texte = Hi Alain,Thanks for the suggestion.I downloaded the upload stuff you mentioned -- but the only code in that example that deals with different platforms is the code that tries to get the uploaded file name out of a Windows file path -- and that's not an issue with my code because I'm re-naming the written file, and therefore I am completely ignoring the name of the original file and its associated file path.If you take a look at my code you can see that there's nothing to it. The form sends upName which is the new name that will be used for the file when it is uploaded to the server. My form also sends upFile which is the actual image data. So basically there are only two pieces of data that get sent to and used on the server -- the new file name and the file data itself.When this data gets to the server, the new file name is extracted from the formvariables context and set as the secure upName variable. Then the image data is extracted from the formvariables context and it is written to a file with the upName name and the .gif extension appended to the end of the upName value -- so the file has an image extension and will be treated as an image by the server and the browsers that try to display it.There are two issues here that seem to be important:1- This code works sometimes (but not all the time) when using the same computer.2- When it doesn't work, the problem seems to be that the image data is cut off at the bottom.When you take these two issues together, they seem to suggest that it's a connection problem. Obviously it works sometimes, so this suggests that my webdna code is fine. And when it doesn't work, the error always presents itself as a missing portion of the image -- at the bottom of the image.Maybe it's a connection problem related to the browser or the server, or maybe it's a connection problem that's not related in any way to the browser or the server. Either way, there doesn't seem to be anything wrong with my webdna code, so ...I'm just going to put a message on the page, below the part that displays the newly uploaded image, to tell visitors that sometimes these uploads fail and if the image appears only partially on the page, then they should just click the 'reload' button and try again until the full image is displayed.Until I learn why this is happening, there seems to be no other way to fix it that I am aware of ... >FYI .. I have a free upload script at Brians dev site .. Can never remember >the address. It is based on the storebuilder upload code. Have a look and >let me know if this works better - it takes into account uploads from >different clients etc .. > >Alain > >>> What code are you using ?? >>> I've never had this happen with our image loading code as far as I know .. >> >> >> II have never seen it happen before either. Then again, I don't do >> this very often and I'm not all that familiar with the bugs in >> certain browsers that might terminate the upload before it is >> finished -- or perhaps the server is terminating the upload >> prematurely? >> >> The code is very simple so I don't think that's the problem, >> especially since it works sometimes: >> >> >> --- the form that posts the data to the server: --- >>
>> >> > > >> >>
>> >> >> --- the code that processes the posted data: --- >> [formvariables] >> >> [showif [url][name][/url]^[url]upName[/url]] >> [text secure=T]upName=[value][/text] >> [/showif] >> >> [showif [url][name][/url]^[url]upFile[/url]] >> [writefile file=photos/[upName].gif&secure=F][value][/writefile] >> [/showif] >> >> [/formvariables] > > > >------------------------------------------------------------- >This message is sent to you because you are subscribed to > the mailing list . >To unsubscribe, E-mail to: >To switch to the DIGEST mode, E-mail to > >Web Archive of this list is at: http://webdna.smithmicro.com/ -- Sincerely, Kenneth Grome ------------------------------------------------------------- Outsource your WebDNA programming for $18 an hour or less! -------------------------------------------------------------------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Images do not upload completely ... (Paul Willis 2003)
  2. Re: Images do not upload completely ... (Kenneth Grome 2003)
  3. Re: Images do not upload completely ... (Gary Krockover 2003)
  4. Re: Images do not upload completely ... (Kenneth Grome 2003)
  5. Re: Images do not upload completely ... (Kenneth Grome 2003)
  6. Re: Images do not upload completely ... (Alain Russell 2003)
  7. Re: Images do not upload completely ... (Kenneth Grome 2003)
  8. Re: Images do not upload completely ... (Alain Russell 2003)
  9. Re: Images do not upload completely ... (Kenneth Grome 2003)
  10. Re: Images do not upload completely ... (Dale's Stuff 2003)
  11. Re: Images do not upload completely ... (Kenneth Grome 2003)
  12. Re: Images do not upload completely ... (Kenneth Grome 2003)
  13. Re: Images do not upload completely ... (Kenneth Grome 2003)
  14. Re: Images do not upload completely ... (Gary Krockover 2003)
  15. Re: Images do not upload completely ... (Donovan home EHG 2003)
  16. Images do not upload completely ... (Kenneth Grome 2003)
Hi Alain,Thanks for the suggestion.I downloaded the upload stuff you mentioned -- but the only code in that example that deals with different platforms is the code that tries to get the uploaded file name out of a Windows file path -- and that's not an issue with my code because I'm re-naming the written file, and therefore I am completely ignoring the name of the original file and its associated file path.If you take a look at my code you can see that there's nothing to it. The form sends upName which is the new name that will be used for the file when it is uploaded to the server. My form also sends upFile which is the actual image data. So basically there are only two pieces of data that get sent to and used on the server -- the new file name and the file data itself.When this data gets to the server, the new file name is extracted from the formvariables context and set as the secure upName variable. Then the image data is extracted from the formvariables context and it is written to a file with the upName name and the .gif extension appended to the end of the upName value -- so the file has an image extension and will be treated as an image by the server and the browsers that try to display it.There are two issues here that seem to be important:1- This code works sometimes (but not all the time) when using the same computer.2- When it doesn't work, the problem seems to be that the image data is cut off at the bottom.When you take these two issues together, they seem to suggest that it's a connection problem. Obviously it works sometimes, so this suggests that my webdna code is fine. And when it doesn't work, the error always presents itself as a missing portion of the image -- at the bottom of the image.Maybe it's a connection problem related to the browser or the server, or maybe it's a connection problem that's not related in any way to the browser or the server. Either way, there doesn't seem to be anything wrong with my webdna code, so ...I'm just going to put a message on the page, below the part that displays the newly uploaded image, to tell visitors that sometimes these uploads fail and if the image appears only partially on the page, then they should just click the 'reload' button and try again until the full image is displayed.Until I learn why this is happening, there seems to be no other way to fix it that I am aware of ... >FYI .. I have a free upload script at Brians dev site .. Can never remember >the address. It is based on the storebuilder upload code. Have a look and >let me know if this works better - it takes into account uploads from >different clients etc .. > >Alain > >>> What code are you using ?? >>> I've never had this happen with our image loading code as far as I know .. >> >> >> II have never seen it happen before either. Then again, I don't do >> this very often and I'm not all that familiar with the bugs in >> certain browsers that might terminate the upload before it is >> finished -- or perhaps the server is terminating the upload >> prematurely? >> >> The code is very simple so I don't think that's the problem, >> especially since it works sometimes: >> >> >> --- the form that posts the data to the server: --- >>
>> >> > > >> >>
>> >> >> --- the code that processes the posted data: --- >> [formvariables] >> >> [showif [url][name][/url]^[url]upName[/url]] >> [text secure=T]upName=[value][/text] >> [/showif] >> >> [showif [url][name][/url]^[url]upFile[/url]] >> [writefile file=photos/[upName].gif&secure=F][value][/writefile] >> [/showif] >> >> [/formvariables] > > > >------------------------------------------------------------- >This message is sent to you because you are subscribed to > the mailing list . >To unsubscribe, E-mail to: >To switch to the DIGEST mode, E-mail to > >Web Archive of this list is at: http://webdna.smithmicro.com/ -- Sincerely, Kenneth Grome ------------------------------------------------------------- Outsource your WebDNA programming for $18 an hour or less! -------------------------------------------------------------------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Kenneth Grome

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

how to get [protect] tag from webcat3b3 to 3.03 on IIS working (1998) Credit Card Number Stripping Digit (1997) Emailer (1997) Plugin or CGI or both (1997) Quitting WebMerchant ? (1997) Odd Cart Behavior (1997) thread discussion solution (2000) if then logic (2005) [WebDNA] Encode cookies ONLY via "method=Base64" (2008) Latin character entities (2007) Webstar V and Webcatalog (2001) Summing a field full of numbers ... (1997) [TaxableTotal] - not working with AOL and IE (1997) Limit on nested [ShowIf]'s? (1997) Nested searches (1998) Re:2nd WebCatalog2 Feature Request (1996) Image as submit button (2000) PSC recommends what date format yr 2000??? (1997) Associative lookup style? (1997) case number with spaces. (2000)