Git Product home page Git Product logo

Comments (9)

luceos avatar luceos commented on July 30, 2024
  • What is the exact problem you experience with renaming .jpg to .jpeg?
  • Did you update the max file size in the extension setting page too, see image:

image

from upload.

DearTanker avatar DearTanker commented on July 30, 2024
  • auto rename is not necessary and it's just wrong
  • of course, i have set to 20480

qq20170315-154449 2x

from upload.

luceos avatar luceos commented on July 30, 2024

auto rename is not necessary and it's just wrong

I disagree. But feel free to offer proper argumentation so at least I have the chance to reconsider, because "not necessary" and "just wrong" doesn't tell me a thing. The reason to do so is to force actual mime types to be used. This prevents abuse of the upload feature. Feel free to read this article and tell me what you think afterward.

Related to the second thing, what error do you get. Uploads still have to be handled by the frontend, I haven't taken into account (nor done any tests with) long running uploads yet (eg movies of several hundreds megabytes).

from upload.

jordanjay29 avatar jordanjay29 commented on July 30, 2024

Mind you, there are 6 different accepted JPEG extensions (.jpg, .jpeg, .jpe, .jif, .jfif, .jfi) and they all should work the same. That's because the MIME type is all JPEG. So, no, it's not wrong and while it might not be necessary it provides some consistency for the extension (which now can look for just one file type instead of 6).

from upload.

DearTanker avatar DearTanker commented on July 30, 2024

@jordanjay29 @luceos so great thinking. i have no word to comment.

just 3.5mb jpg and i get error.

image

but when i use Image Upload 0.3.1, all fine.

from upload.

DearTanker avatar DearTanker commented on July 30, 2024

by the way, jpg is more popular than jpeg, why not auto change to jpg.

from upload.

luceos avatar luceos commented on July 30, 2024

Do you see any errors in your webserver log or storage/logs/flarum.log file that might relate to the upload issue?

from upload.

 avatar commented on July 30, 2024

@DearTanker You should check upload_max_filesize & post_max_size in php.ini Also make sure you're editing the correct php.ini. There is usually one for CLI & one for php-fpm.

There are similar limits within the webserver config.

for nginx check: client_max_body_size

from upload.

luceos avatar luceos commented on July 30, 2024

I've improved error handling of the upload methods. They now verify ini-settings and throw related exceptions. Not going to change logic for jpeg file types.

from upload.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.