I have a model with url images in this format "https://drive.google.com/file/d/< id >/view".
Urls are referred to images stored on my Drive.
I have an image widget into form binding to the url in images model.
When I preview the app, the url works as href but image is not displayed in the form.
What's wrong? Someone can help me please?
Take a look at Images Sample(https://developers.google.com/appmaker/samples/images/), it does exactly what you want. Just in case, the 'prestige' of that sample is hidden behind this line of code in onCreate method of the DriveImage model:
record.ImageUrl = Drive.Files.get(record.Id).webContentLink;
Related
I'm trying to link a questionnaire composed in Forms to a pdf document. Ideally I'd like to web host the document and link directly to a page or section of said document.
Is there a way to, using script,
include a named hyperlink in a Form? And,
make the link point to a web hosted pdf at a particular page or section?
Thanks in advance,
Zak
This is image was taken from a PDF and saved as a jpg. And then uploaded to a form.
Here's an example of adding an image to a form:
// Open a form by ID and add a new image item
var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
var img = UrlFetchApp.fetch('https://www.google.com/images/srpr/logo4w.png');
form.addImageItem()
.setTitle('Google')
.setHelpText('Google Logo') // The help text is the image description
.setImage(img);
Here's the link to reference documentation.
t.co of twitter is not fetching images. After redirecting to another link it is unable to fetch the images.
my code is:
<pre>
<img class="imgmyclass" src="https://t.co/onj4Gps4rQ">
</pre>
please help.
Thanks
Because the url does not point to an image.
As far as the image in the link you are trying to extract the image from is concerned, use this:
<img class="imgmyclass" src="https://pbs.twimg.com/media/CZ4p4TCUAAEQKJt.jpg">
Where src tag is used to point to an image, not the url of a page which contains a post and an image associated with it.
If you want to extract the image url, open the html page, right click on the image and hit copy link address. Do not forget to Give proper credits to the owner of the image.
So I am using the rails 'link_to' method to redirect a user to an external website upon clicking on it (where the link is inside a google maps marker info box). I am using the Gmaps4rails gem. I am building the link inside the marker info window as below, in one of my controllers, where each #locations has a website as one of its attributes:
#hash = Gmaps4rails.build_markers(#locations) do |location, marker|
link = view_context.link_to "#{location.website}", location.website, target: "_blank"
description = "Website: #{link}"
marker.infowindow description
end
Everything gets plotted fine, and the links work fine for about half the markers, where if you click on the website link in the description you get redirected to the website in a new tab.
However, there are some website links in which my code acts strange; clicking on the url redirects you to my "website url + the marker's website url", concatenated into one url.Why is this happening?
For example, the url upon clicking on some of the website links in the markers redirects you to a url like this: "mywebsite.com/www.website_in_marker.com". And of course I get a page you are looking for does not exist error.
It's very likely that some of the links do not have a protocol (http, https, etc.) prepended to it. Anything in the href without a protocol is assumed to be a relative path, which is why some links are appended in relation to your site and others are not.
Going through and ensuring all links include a protocol would be one way to resolve the issue.
Hope it helps!
I am using QR code API from this website. It generates QR code image from the URL input we give to it. For example, I am showing the QRCode of data 'abcd' on my website by adding an <img> tag of src=https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=abcd. This shows the QR on screen, but I also want to give a download link to that image. Suppose if a user clicks on that image, it should get downloaded. How to do that? I am confused because the image is getting generated dynamically and I dont have a name or specific url to it.
I would like to view images on my box account natively inside a simple rails app. The goal is to run a slide-show with these images. I looked for the necessary parameters to pass each images relative url into a <img source> tag. It appears that I can only download images, or view them from within the Box application.
Is this accurate, or did I miss something within the Box API documentation?
When you create a shared link for a file, there is a download_url attribute that can be used to link directly to the file.
http://developers.box.com/docs/#files-create-a-shared-link-for-a-file