• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Can't upload image if option "restrict file type" is set when I do post creation

Scheduled Pinned Locked Moved Bug Reports
6 Posts 3 Posters 2.8k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Charly86C Offline
    Charly86C Offline
    Charly86
    wrote on last edited by Charly86
    #1

    What is the exact syntax to put in the field "Allowed file types, (ie png, pdf, zip). Leave empty to allow all"

    If I leave the field empty I can upload image or whatever but as soon as I put file extension it says after upload that I can't do it because file type is not allowed. I tried all of these without any success
    jpg png pdf zip
    jpg,png,pdf,zip
    jpg, png, pdf, zip
    jpg

    Any ideas ?

    You can do a test on my community, currently setup with jpg only

    1 Reply Last reply
    0
  • huashengH Offline
    huashengH Offline
    huasheng
    wrote on last edited by
    #2

    Yes, I got the same problem, any solution?

    1 Reply Last reply
    0
  • Charly86C Offline
    Charly86C Offline
    Charly86
    wrote on last edited by
    #3

    @huasheng
    I can't believe nobody's using this features 😉
    except if we missed a great plugins that do things better, let us know

    1 Reply Last reply
    0
  • rbeerR Offline
    rbeerR Offline
    rbeer GNU/Linux
    wrote on last edited by rbeer
    #4

    @Charly86
    Indeed, I think some use https://github.com/bdharrington7/nodebb-plugin-imgbed

    But nonetheless, I got some troubles with the upload feature myself. I think it needs some attention, generally.

    1 Reply Last reply
    0
  • Charly86C Offline
    Charly86C Offline
    Charly86
    wrote on last edited by Charly86
    #5

    Ok guys, solved !!!!
    Just went into source file and done some debugging. No luck I had, in fact type we need to put in this field should match I think mime type and this one can be different than file extension.
    So if you want to upload .jpg (the tests I've done) you need to put in this box
    jpeg (type) and not jpg (file extension)
    and if you want to allow upload upload of .jpg and .png (file extension is the same than type for this one) you need to comma separated so
    jpeg,png
    may be changing text above this field would allow users to understand better 😉

    I'm now working with the following configuration
    jpeg,png,gif
    works like a charm 😉

    1 Reply Last reply
    1
  • rbeerR Offline
    rbeerR Offline
    rbeer GNU/Linux
    wrote on last edited by
    #6

    Haha, nice one. I need to correct myself, too. 😓
    Turns out I just wanted more, more, more(!), again. 🙂

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development