GithubHelp home page GithubHelp logo

Comments (19)

mokejp avatar mokejp commented on July 4, 2024 3

@synr
I guess you think 700 is a directory name.
1040, 700, 460, 300 and 240 are filenames, not directory names.
So, you should place images that named 1040, 700 and etc. without extension.

This is example.

from line-bot-sdk-go.

sugyan avatar sugyan commented on July 4, 2024 1

@uopeydel If you have image file named 700.jpg and supply as static file, you should copy and resize it and deploy each size.
700.jpg ➡️ (resize to 240x240) ➡️ https://example.com/images/cats/240 (no extension)
700.jpg ➡️ (resize to 300x300) ➡️ https://example.com/images/cats/300 (no extension)
700.jpg ➡️ (resize to 460x460) ➡️ https://example.com/images/cats/460 (no extension)
700.jpg ➡️ (rename) ➡️ https://example.com/images/cats/700 (no extension)
700.jpg ➡️ (resize to 1040x1040) ➡️ https://example.com/images/cats/1040 (no extension)

and you specify baseUrl as https://example.com/images/cats, it will work well.

from line-bot-sdk-go.

sugyan avatar sugyan commented on July 4, 2024 1

@uopeydel
No. No. URL is https://dev-chat.on.lk/Content/image/show/700. There is no extension like ".jpg".

Files of example app https://github.com/line/line-bot-sdk-go/tree/master/examples/kitchensink/static/rich have no extensions, but static server returns image content. You must supply image in https://dev-chat.on.lk/Content/image/show/700, not https://dev-chat.on.lk/Content/image/show/700.jpg.

from line-bot-sdk-go.

highmusahi avatar highmusahi commented on July 4, 2024 1

"type": "imagemap", "baseUrl":"http://res.cloudinary.com/dazmnrals/image/upload/v1498200198/honda_car/brio/240",
"altText": "this is an imagemap",
"baseSize": {
"height": 240,
"width": 240
},
"actions": [
{
"type": "uri",
"linkUri": "http://res.cloudinary.com",
"area": {
"x": 0,
"y": 0,
"width": 240,
"height": 240
}
}
i try this but it doesn't work at all
doc: https://devdocs.line.me/en/#imagemap-message

from line-bot-sdk-go.

sugyan avatar sugyan commented on July 4, 2024

Details about baseURL are written in the document, so please read it.
https://devdocs.line.me/en/#base-url

from line-bot-sdk-go.

synr avatar synr commented on July 4, 2024

I read that.
But I still don't know.
What picture filename set ???

https://example.com/images/cats
https://example.com/images/cats/700

Any filename is ok?

https://example.com/images/cats/123456789.jpg
https://example.com/images/cats/700/123456789.jpg

from line-bot-sdk-go.

synr avatar synr commented on July 4, 2024

@mokejp
Thank you!!
I try it and success!

from line-bot-sdk-go.

uopeydel avatar uopeydel commented on July 4, 2024

hey guy i dont understand it to but when i read all comment in this page it still not understand.
please explain me to use image map a little..

https://example.com/images/cats/700.jpg

ex. if i habe image same this how can i do? in image map json? i paste url with no .jpg? or i will rename it remove .jpg? or else?
i can set baseUrl = "https://example.com/images/cats/700"
and linkUri ="https://www.google.co.th/"
or other thing?

from line-bot-sdk-go.

uopeydel avatar uopeydel commented on July 4, 2024

my image is https://dev-chat.on.lk/Content/image/show/700.jpg
its size 460x460
linkUri ="https://dev-chat.on.lk/Content/image/show/460";
baseUrl ="https://dev-chat.on.lk/Content/image/show";

doesn't work.

from line-bot-sdk-go.

sugyan avatar sugyan commented on July 4, 2024

@uopeydel
When you specified baseUrl as https://dev-chat.on.lk/Content/image/show, LINE client will get image of following URLs

so please deploy each size images for them.

Since linkUri is for actions, it does not matter.

from line-bot-sdk-go.

sugyan avatar sugyan commented on July 4, 2024

@uopeydel
I've wrote URLs which must return image.

https://dev-chat.on.lk/Content/image/show/240
https://dev-chat.on.lk/Content/image/show/300
https://dev-chat.on.lk/Content/image/show/460
https://dev-chat.on.lk/Content/image/show/700
https://dev-chat.on.lk/Content/image/show/1040

but they still return "404 Not Found". Please upload each size images...

from line-bot-sdk-go.

uopeydel avatar uopeydel commented on July 4, 2024

https://dev-chat.on.lk/Content/image/show/700.jpg << but this link can do image ?

from line-bot-sdk-go.

jaajaah avatar jaajaah commented on July 4, 2024

@sugyan
thanks when i upload 5 file size and i can do it success,
but i want to upload image 1 file only ,Can i do ?

from line-bot-sdk-go.

StefanMao avatar StefanMao commented on July 4, 2024

from line-bot-sdk-go.

StefanMao avatar StefanMao commented on July 4, 2024

from line-bot-sdk-go.

jaajaah avatar jaajaah commented on July 4, 2024

@StefanMao
thanks ,, I tested upload 5 files (different size) it's work.
But I want to upload just 1 file
such as URL https://xxx/image/001/
directory for upload ..//image/001/

What should I do ? Can you suggest me please ?

from line-bot-sdk-go.

IT5706021631069 avatar IT5706021631069 commented on July 4, 2024

@jaajaah
Can you show your code about image map?
Thanks.

from line-bot-sdk-go.

IT5706021631069 avatar IT5706021631069 commented on July 4, 2024

i upload 5 size images on github(https://github.com/IT5706021631069/imagemap_line/tree/master/rich/)
but it show Unable to load image.

from line-bot-sdk-go.

jaajaah avatar jaajaah commented on July 4, 2024

@IT5706021631069
{
"type": "imagemap",
"baseUrl": "https://example.com/images/pic001",
"altText": "this is an imagemap",
"baseSize": {
"height": 1040,
"width": 1040
},
"actions": [
{
"type": "uri",
"linkUri": "https://example.com/",
"area": {
"x": 0,
"y": 0,
"width": 520,
"height": 1040
}
}
]
}

//***************************************
directory for upload 5 file no extensions
..//images/pic001/240
..//images/pic001/300
..//images/pic001/460
..//images/pic001/700
..//images/pic001/1040

from line-bot-sdk-go.

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.