1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Member with satellite Internet cannot upload images

Discussion in 'Troubleshooting and Problems' started by craigiri, Jun 9, 2012.

  1. craigiri

    craigiri Well-Known Member

    He says he gets an error 90% of the time.

    I am trying to get more info on the computer/browser/error, but the guy is pretty well versed in basics of computers and has participated for years on our old forum.

    Is there a timeout of sorts in the flash uploader or elsewhere I might be able to set for a longer time?

    Any hints welcome.
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    What error?
     
  3. craigiri

    craigiri Well-Known Member

    There has been an error uploading this file.
    He has tried two different browsers.

    Screen Shot 2012-06-10 at 9.28.10 AM.png
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    If he was to e-mail you the photo are you able to upload it?
     
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Bleh, that's the generic one. Doesn't tell us much. Is there anything in the log?

    Admin CP -> Tools -> Server Error Log

    A timeout is possible. There is the max_execution_time in PHP. And XF's AJAX has a timeout of 30s. Has he tried different files? Perhaps smaller files? He is the only person with this problem?
     
  6. craigiri

    craigiri Well-Known Member

    He seems to be the only user with this problem, but we probably have very few satellite users and it is the slow time of year.
    Jake, is the Ajax timeout able to be set longer somewhere?

    Images are OK.....I can upload. Nothing in the logs I can see. I will check there again.
     
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  8. craigiri

    craigiri Well-Known Member

    I changed the timeouts - no go!
    His uploads are still not working 90% of the time.

    Is there any way for ONE user to diable the flash uploads and us a simple uploader?

    Any other possibilities here?
     
  9. Chris D

    Chris D XenForo Developer Staff Member

    There is a way...

    Not the most elegant solution.

    Template attachment_upload_button

    Change:

    Code:
    <xen:if is="{$xenOptions.swfUpload}">
    <xen:require js="js/swfupload/swfupload.min.js" />
    </xen:if>
    To:

    Code:
    <xen:if is="{$visitor.user_id} == 1">
    <xen:else />
    <xen:if is="{$xenOptions.swfUpload}">
    <xen:require js="js/swfupload/swfupload.min.js" />
    </xen:if>
    </xen:if>
    Where 1 is the user ID of the user having problems.
     
    Dodgeboard likes this.
  10. craigiri

    craigiri Well-Known Member

    Thanks....maybe I will give that a try!
     
  11. craigiri

    craigiri Well-Known Member

    Chris, that worked!

    I tried everything else.

    So my assumption is that this is a bug in the flash uploaded. It throws off an error to him in 12-15 seconds, which is well before any timeout. But the plain uploaded just takes its time and does the job.

    Thanks!

    It might be that eventually someone else needs your code or a takeoff on it that allows an array of users to be exempted...that is, more than one!
     
  12. Chris D

    Chris D XenForo Developer Staff Member

    Glad that worked :)

    For an array of users

    Code:
    <xen:if is="in_array({$visitor.user_id}, array(x, y, z))">
    <xen:else />
    	<xen:if is="{$xenOptions.swfUpload}">
    		<xen:require js="js/swfupload/swfupload.min.js" />
    	</xen:if>
    </xen:if>
    Where x, y and z are all different User IDs.
     
    Jake Bunce and craigiri like this.
  13. craigiri

    craigiri Well-Known Member

    Great - I think this should help others in the future - I only have one guy who reported it out of thousands of users, but he is in a very rural area and uses satellite. Perhaps the flash uploader code has various hooks in it which error-out due to the sloppiness (lag times) of the space connection! After all, the speed of light can be slow sometimes!
     
    Chris D likes this.

Share This Page