-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get pictures into ItemsAPI? #20
Comments
You need to provide |
Is it possible to upload a local file? |
Also, when I click on an item, is it possible to link it to a pdf file? |
If you open /admin/images and configure AWS S3 then it should be possible to store images. Not sure how stable this feature was. It will be easier I guess if you provide link in your JSON file to external pdf / image |
If you customize |
Just open <div class="items">
{% for item in items %}
<div class="col-xs-3 col-md-3" style="height: 220px;">
<a href="{% if item.permalink %}/item/{{ item.permalink }}{% else %}/id/{{ item.id }}{% endif %}" class="">
<img class="img-thumbnail" src="{% if item.image %}{{ item.image }}{% else %}{{ image }} {% endif %}" alt="{{ item.domain }}">
<p>{{ item.domain }}</p>
</a>
</div>
{% endfor %}
</div> and then provide a link there to your pdf instead of going to |
How would I get here on Heroku? |
You should run it on your localhost, modify and then redeploy. Not sure how to do it fast but I think this tutorial can be helpful https://devcenter.heroku.com/articles/getting-started-with-nodejs#introduction |
you already answered my question on linkedin (sorry for asking twice), but thank you so much |
Oh, you are using windows. I've never tried that with windows. It might get more complicated. Ideally if you use linux. Vagrant can help you run a virtual machine i.e. ubuntu on your windows (https://www.vagrantup.com/intro/getting-started/). You can also try docker composer which starts everything for you out of the box on all operating systems. (https://www.itemsapi.com/docs/starter/installation/). There are some updates thanks to @fbertetto which allows you to edit files locally on your windows and run that easily using docker compose. Not sure how convenient is a development with docker composer though. |
Do you have mongodb installed on your localhost ? You can check it out by writing |
Yeah I got that fixed.
…On Tue, Jul 11, 2017 at 10:10 AM, Matt Rzepa ***@***.***> wrote:
Do you have mongodb installed on your localhost ? You can check it out by
writing mongo in your CLI.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AcFAP2O3vDr_45OjtWKjtG5t_W_PVztOks5sM5BZgaJpZM4OS8O0>
.
|
I got everything to work :), but how do you make a range value with ItemsAPI. Like how would I be able to input data saying that an item has been in use from 2340 to 23948 hours? |
Hello @floppyapple123, do you mean range aggregations like: or ? |
Regarding 1) Regarding 2) (Getting stuck on installation page) |
Are you trying with a demo items https://raw.githubusercontent.com/itemsapi/itemsapi-example-data/master/items/movies-processed.json or a custom one ? |
it works for neither the demo items nor a custom one. The log i attached above is from the demo items |
@floppyapple123 it can be a index limit from a Heroku external ES provider. I had such a problem in the past. I was testing now and it's working fine. You can try to remove some of your heroku apps and try again. |
Heroku is using https://bonsai.io/ for ES. Maybe there are also some error information in bonsai directly |
So is there any way to see that?
…On Thu, Jul 13, 2017 at 10:36 AM, Matt Rzepa ***@***.***> wrote:
Heroku is using https://bonsai.io/ for ES. Maybe there are also some
error information in bonsai directly
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AcFAP_4J2bC4yLppKUZLFc5cxf8q1f-jks5sNjl7gaJpZM4OS8O0>
.
|
Not sure how to fix it. Maybe there is a limit in index amount and removing some of them will be a solution |
I've already deleted all but two apps in my heroku |
I've gotten it to run the same way before, i don't know why its messing up right now |
Could you try again from scratch https://heroku.com/deploy?template=https://github.com/itemsapi/starter/tree/master ? |
Deploying from there works fine. The problem I'm having is that I need to edit the catalog.html.twig file, so I'm getting it locally, by going into CMD and hitting $heroku login |
Your method is great but I am getting then: {
"message": "unexpected error - probably mongodb is required"
} Usually I was using https://heroku.com/deploy?template=https://github.com/itemsapi/starter/tree/master You will find it in https://dashboard.heroku.com/apps -> your app -> deploy |
you have to go into heroku and go into the resources tab and manually add mongodb, bonsai elasticsearch and redis |
Nice, very tricky. Ensure you are using ES 1.7 in Bonsai. When you are using https://heroku.com/deploy?template=https://github.com/itemsapi/starter/tree/master then it's defined in app.json https://github.com/itemsapi/starter/blob/master/app.json In here: It is taking ES 5.3.2 probably |
my app.json is the exact same as yours |
does it work for you? |
so is there any way to get itemsAPI locally and run it off heroku? |
Probably the easiest way to start (after heroku) is docker composer. Personally the best for me is linux ubuntu. It can be run on localhost with vagrant or also with https://www.digitalocean.com/. You can install all dependencies manually or with preconfigured ansible script. |
I emailed bonsai support and got downgraded to 1.7.5 and it works now :) |
Wow, that's great about them :) |
Hey, yes. How the private files work in AWS S3 - I mean how amazon is making the authentication for the private files (by IP, token) ? |
I want to get the pdf icon on all of my entries, but I don't really know how to do so. Could anyone explain how to? I'm running it off of Heroku. Thanks.
The text was updated successfully, but these errors were encountered: