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

Upload a file button is an SWF flash file, why?

Discussion in 'XenForo Development Discussions' started by tenants, Oct 7, 2011.

  1. tenants

    tenants Well-Known Member

    <grr, typo hell> can this title be updated to: "Upload a file button is an SWF flash file, why?"

    Why have dependency on Flash at all?

    <span id="AttachmentUploader" class="buttonProxy AttachmentUploader" data-err-130="The uploaded file does not have an allowed extension." ... style="">
    <object id="SWFUpload_0" class="swfupload" width="1" height="1" data="js/swfupload/Flash/swfupload.swf" type="application/x-shockwave-flash" ... >
    <input id="ctrl_uploader" class="button OverlayTrigger DisableOnSubmit" type="button" value="Upload a File" ... >
    It seems a bit strange having this one button as an embedded flash file, why is xen doing this?


    I just stumbled into it, since I wanted to make use of xens upload file functionality (so users can upload images), but it doesnt look like it's going to be that easy to use this swf method...

    anyone had any success with using this to upload files
  2. Kier

    Kier XenForo Developer Staff Member

    That Flash file is the uploader.
  3. tenants

    tenants Well-Known Member

    Yup, I've just added this to a template :

    <xen:include template="attachment_upload_button" />

    and bang, users can upload files...
    I'm not sure how anything is retuned from this, so a thread / post / anything else can know where to link to the image ...

    So my poor partner on her iPad (poor... tsh!) wont be able to upload files?

    Edit, I've started to dig into this and found the following filed might give me some clues, it uses the action: attachments/do-upload (defined in the 1st file below)


    - I'll decompile the swf file later to see whats going on inside that... for now the above files should give me some clues
  4. island

    island Active Member

    For what it's worth, I just got an ipad2 last month and a default file select upload field doesn't allow you select a file to upload either... a limitation of mobile safari and the way the ios is "file system-less" or some such... since you can select a file to save into your photos, I don't understand why the app linkage doesn't by default work the other way too, with mobile safari able to select a photo from your photos to upload, but ...
  5. xfrocks

    xfrocks Well-Known Member

    XenForo uses Flash because originally, file input doesn't support selecting multiple files at once. This Flash uploader is a pretty good one (http://swfupload.org/). And finally, it falls back to file input if Flash is not installed.
  6. tekgirl

    tekgirl Active Member

    I have some users who need to use the ipad exclusively and want to upload avatars. They cannot upload as of right now. I'm assuming I need to disable the flash uploader?

  7. xfrocks

    xfrocks Well-Known Member

    Even using standard upload button won't help because apps in iOS are sandboxed. Apps can't access system files. Your friend won't be able to upload avatar from their iPad anyway so you should keep using the flash button.
  8. tekgirl

    tekgirl Active Member

    Ok - thanks much - that answered my question...does that go for all images? This person is visually impaired and only uses the iPad..she is a user on my forum and I feel terrible that she cannot upload an avatar or images, if that is the case. I can always upload her avatar for her, that is no porblem...but I dont' ahve time to upload images for her.
  9. DBA

    DBA Well-Known Member

    You CAN upload images on an IPad (and other IOS devices) if you use the Tapatalk app.
  10. tekgirl

    tekgirl Active Member

    That would be great1 And users can just download from Apple iphone store?

  11. DBA

    DBA Well-Known Member

    Yes, however you must support/install Tapatalk on your forum.

  12. tekgirl

    tekgirl Active Member

    Is it easy to install on XF?
  13. tekgirl

    tekgirl Active Member

    Thanks for the info...I see that it is an add on, so looks pretty straightforward. Much appreciate your help.
  14. DBA

    DBA Well-Known Member

    Taken from TT's website:

    xenForo 1.x - Installation
    • Download the zip package to your computer.
    • Unzip the package and upload all files and directories inside the 'upload' folder to your forum directory
    • Login to your forum Admin Control Panel and go to Home->Install Add-on
    • Install the file 'addon-Tapatalk.xml' in the plugin package.
    • ** Make sure the "mobiquo" folder AND all files inside has the proper permission with at least "755" (chmod -R 755).
  15. tekgirl

    tekgirl Active Member

    Thanks...saw this on the site after I posted :) But great to get such quick help!
  16. DBA

    DBA Well-Known Member

    No problem, had to check it myself as I'd forgotten to add this to my list of things to do post migration. (y)
  17. D.O.A.

    D.O.A. Well-Known Member

    I have this problem with many of my users, and the general consensus is 'apple are scum'. Swfupload is a great open source project that follows standards, where as steve jobs was an elitist cash vacuum scumbag.
    I rest my case.
  18. Dinh Thanh

    Dinh Thanh Well-Known Member

    iOS 6 support File upload (single file) on iPad/iPhone.
    XF 1.2 will support HTML5 upload with multiple files :cool:

Share This Page