Posting Photos from Smartphone into Discourse (Mobile)


(Bcguy) #1

Just reviewing the latest Internet Trends report from Kleiner Perkins

and it seems like it would be very valuable to have the ability to very easily post photos into our Discourse forums, from smartphone based users.

How hard is this now for us, compared to something like a Facebook app?

I’m thinking specifically related to increasing usage by our 20 something y.o. users…


(Michael Downey) #2

4 taps:

  1. “Reply”
  2. “Upload”
  3. “Camera” (source option selection for Android)
  4. Take photo

On the Facebook app, also 4 taps:

  1. Tap “Comment”
  2. Tap the camera icon
  3. Tap the “take photo” button
  4. Take photo

Of course, here on Meta, I couldn’t actually upload the photo I took because it was too large (maximum size 3072kb) until @codinghorror finishes installing the new 32 MB hard drive on the server:


(Jeff Atwood) #3

This is a non issue, however, there is a problem in that smartphone images will soon be one terabyte in raw size. I may be exaggerating for effect, but we need a way for the device to send us a size other than “as large as possible” – you can resize on the client but it is extremely resource intensive to resize an image in JavaScript.


#4

Isn’t that what having ImageMagick on the server is for?


(Pablo Macaluso) #5

Press Upload

Select Camera

Take a Shoot.

Nothings happend.


(Bcguy) #6

Do we need to add something to our install of Discourse if we are not hosted by the company Discourse?


#7

I’d say you are certainly exaggerating for effect. My phone has a 13MP camera and takes 4160x3120 pics. Generally speaking, that’s a big picture for a smartphone. Guess how big the pics are in terms of file size:

  • ~0.4 MB
  • ~4 MB
  • ~40 MB
  • ~400 MB
  • ~4 GB

0 voters


#8

Answer: ~4 MB

We are nowhere near 1 GB, let alone 1 TB pictures. I don’t think you need to worry too much about this. Just resize on server side.


(Michael Downey) #9

Without giving away the answer to the poll by @abarker, can I just say that the current default for the site setting max image size kb is not a “sane” default. It should be at least as big as the typical file size of most phone cameras. :smile:


(Dean Taylor) #10

Back in mid-January the decision was made to increase the upload size to 10MB, it was based (in part) on information I posted based on actual sizes of images uploaded by the most popular mobile phones of that time.

Regardless, I believe the following topic is the one to follow if you are interested in the future of image uploads for mobile:


(Michael Downey) #11

This will be great. Is it currently on the roadmap for an upcoming release?


(Dean Taylor) #12

As far as I’m aware it has already been rolled out in beta many months ago.

Personally I bumped my Discourse installs before the change was committed.


(Michael Downey) #13

I run against tests-passed and the default is still 3MB.


(Dean Taylor) #14

Confirmed the limit was upped to 10MB in Jan/Feb

https://github.com/discourse/discourse_docker/commit/44c59d379e3a2424514eae01fa691d3cb6311de5

https://github.com/discourse/discourse/commit/363fc03ab3b528b3a23d6fe6d37c3c608524895b

You might have to update your site setting and ensure your docker templates are updated too


(Michael Downey) #15

If that’s the case, isn’t the feature incomplete? :slight_smile:


(Dean Taylor) #16

The “feature” was to increase the initial defaults, obviously if you installed / setup Discourse before this time you will have created your instance when the defaults were the lower 3MB instead of 10MB.


(Michael Downey) #17

Sure, I could change the value to from 3072 to 10240, but if I hit the “reset to default” button after that which appears when you change a site setting from the default, it will still revert to the default value of 3072.

Are you saying that those site setting defaults can’t be updated after the initial installation?


(Dean Taylor) #18

I think that’s one for the Discourse team to confirm exactly what the effects of the change was - for me I’m not using the defaults for this setting.


(Jeff Atwood) #19

No. The nginx side allows up to 10mb once you update your container. The client and Ruby server allow what the site setting says.

Think of it as water flowing through two different pipes. If the upstream pipe is too small, it does not matter how large the downstream pipe is.


(Michael Downey) #20

Understand about the upstream constraints.

But is the intention to leave the site setting default at 3mb?