@MariaEuler it looks like they display - but the sizing is not great, as there is no particular formatting of the images. I’ll include an improvement in the next update.
I still do not get it to work. Would like to see the text source nadia formated but can not find it. but let’s figure this out tomorrow.
this is the text source: Co-working spaces: can they help employees and freelancers in the covid19 world?
Come meet everyone on October 16: Info session about our new Worldbuilding academy! to Edgeryders Forms …ok figured it out as well. the display sizing issue fixed would be nice, but yes, we can do it if necessary.
the difference is here:
(1) from Nadia’s post:
![|480x360](https://i.ytimg.com/vi/oGCEGycWgfo/hqdefault.jpg)
(2) when I upload an image:
![hqdefault|480x360](upload://6zYuxB5stQ53ZzgZlE5XGMioww3.jpeg)
Notice in the second one the url is not a hosted image url (or at least the server it is hosted on is not shown in the string).
Now if I right click that image in the post and copy the image url, then include that in the post it will work.
This is an issue with uploading images in posts on Discourse. @matthias maybe you have an idea of why this happens & if it can be fixed.
Cool
Hey @MariaEuler
Yes it’s what we discussed yesterday with image sizing, I will have a fix up this weekend.
Fixed now.
It’s not something we can fix since it is intentionally that way by Discourse. But you can do the same transformation that Discourse does to calculate the final URL for img
tags from the upload://
URL. I’ll show how it works with one example:
Let’s say we have the following upload URL and a corresponding so-called “cooked” URL:
upload://w6Q793RK3Xl2Tjw1IoVXzmv3X00.jpeg
https://edgeryders.eu/uploads/default/original/2X/e/e10b857825d31d2c8479e246704de45ff241da44.jpeg
The cooked URL contains the hostname, directory uploads/default/original/2X
, then a directory with one letter conforming to the first letter of the image filename, and then the image file basename, and the original file extension. The non-obvious part is to create the image filename. This is done by interpreting the basename of the upload URL w6Q793RK3Xl2Tjw1IoVXzmv3X00
as a Base62 number with character set 0-9
, a-z
, A-Z
and convert it to a Base16 number.
Discourse uses the base62-rb
gem library for this purpose, and I just tried that conversion successfully as follows in IRB (an interactive Ruby shell):
$ gem install base62-rb
$ irb
irb(main):001:0> require 'base62-rb'
=> true
irb(main):004:0> Base62.decode("w6Q793RK3Xl2Tjw1IoVXzmv3X00").to_s(16)
=> "e10b857825d31d2c8479e246704de45ff241da44"
So your task would be to do the same in JavaScript. For reference, the place where Discourse itself does this is models/upload.rb
line 277:
Thanks for the explanation!
ping @owen could you please check the pictures in these two form sets? For some reasons they do not work event so I used and URL. What do I do wrong?
+ and much more important on the top of the tell.form it shows the date the teext souce post was made, which is in conflict with the date of the actual event. can you remove this? (Maybe in general)
ping @owen could you please check the pictures in these two form sets? For some reasons they do not work event so I used and URL. What do I do wrong?
@Maria it looks like they display fine?
- and much more important on the top of the tell.form it shows the date the teext souce post was made, which is in conflict with the date of the actual event. can you remove this? (Maybe in general)
Yep, that’s done now.
Hi,
I have seen this post has already its form but it contains a broken link and I do not know how to correct it. The link under “alien economy on Earth” should point to this page and not to the empty one where it points now.
Thanks
ping @owen @MariaEuler
Works for me ???
Weird. If I click it on the form (not on the original page) it takes me here which appears to be an empty page.
Not weird at all. On the form, the link points to https://tell.edgeryders.eu/t/13876
(which is obviously empty), instead of https://edgeryders.eu/t/13876
. If you have edit privileges, change it. If not, ask @owen. It might even be a bug, if the Webkit adds a default first part of the URL.
Yes, that is why I posted. I do not know how to correct that because I am not yet that familiar with the Discourse to go mess with it.
this link is just the Edgeryders Forms with 13876 wich is the number at the end of the page it points towards: The Catalan Integral Cooperative: another alien economy on Earth?. this is not how the forms work. YOu have to set up the code post, in the code post you insert the number from the post it is supposed to direct to and the tell.from address then uses the number on the end of that code post.
see the step by step guide here:
and once a form is generated it should be added to the inventory here with those links:
- tell.form link
- link to code thread for this form
- link to page it points to + evt. link to post the text is sourced from
this makes troubleshooting a lot easier
so the dead link you are refering to lacks a codepost. NO idea if it was made and just the= wron number used or if it was not made.
this way we are linking directly to the post, which is absolutely fine if you do not want to link to a form. Was it meant to got to a form or not?