Help to define Jsonfactory

@dan1st | Daniel Can you help me to write JsonFactory bean? I got this error:
Error starting ApplicationContext.
Description:

Parameter 1 of constructor in coms.configuration.BloggerServiceConfiguration required a bean of type 'com.google.api.client.json.JsonFactory' that could not be found.


Action:

Consider defining a bean of type 'com.google.api.client.json.JsonFactory' in your configuration.
Error starting ApplicationContext.
Description:

Parameter 1 of constructor in coms.configuration.BloggerServiceConfiguration required a bean of type 'com.google.api.client.json.JsonFactory' that could not be found.


Action:

Consider defining a bean of type 'com.google.api.client.json.JsonFactory' in your configuration.
The BloggerServiceConfiguration is:
@Configuration
public class BloggerServiceConfiguration {
@Value("${GOOGLE_CLIENT_ID}")
private String googleClientId;

private final HttpTransport httpTransport;
private final JsonFactory jsonFactory;
private final OAuth2AuthorizedClientService authorizedClientService;

public BloggerServiceConfiguration(HttpTransport httpTransport,
JsonFactory jsonFactory,
OAuth2AuthorizedClientService authorizedClientService,
@Value("${GOOGLE_CLIENT_ID}") String googleClientId) {
this.httpTransport = httpTransport;
this.jsonFactory = jsonFactory;
this.authorizedClientService = authorizedClientService;
this.googleClientId = googleClientId;
}

@Bean
public Blogger bloggerService() {
//....
@Configuration
public class BloggerServiceConfiguration {
@Value("${GOOGLE_CLIENT_ID}")
private String googleClientId;

private final HttpTransport httpTransport;
private final JsonFactory jsonFactory;
private final OAuth2AuthorizedClientService authorizedClientService;

public BloggerServiceConfiguration(HttpTransport httpTransport,
JsonFactory jsonFactory,
OAuth2AuthorizedClientService authorizedClientService,
@Value("${GOOGLE_CLIENT_ID}") String googleClientId) {
this.httpTransport = httpTransport;
this.jsonFactory = jsonFactory;
this.authorizedClientService = authorizedClientService;
this.googleClientId = googleClientId;
}

@Bean
public Blogger bloggerService() {
//....
I try to define the JsonFactory:
@Configuration
public class GoogleApiConfiguration {
@Bean
public HttpTransport httpTransport() {
return new NetHttpTransport();
}

@Bean
public JsonFactory jsonFactory() {
return JacksonFactory.getDefaultInstance();
}
}
@Configuration
public class GoogleApiConfiguration {
@Bean
public HttpTransport httpTransport() {
return new NetHttpTransport();
}

@Bean
public JsonFactory jsonFactory() {
return JacksonFactory.getDefaultInstance();
}
}
But JacksonFactory is underlined in red - JacksonFactory cannot be resolved The com.google.api.client.json.jackson2.. is obsolete. Now jackson comes from:
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
But how to use it in bean?
78 Replies
JavaBot
JavaBot7mo ago
This post has been reserved for your question.
Hey @Tomasm21! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
dan1st
dan1st7mo ago
Can you show the full stack trace/error? What's the package of the main class? What's the package of GoogleApiConfiguration?
Tomasm21
Tomasm21OP7mo ago
No stack trace. I cannot start the app. package:
package coms.configuration;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.google.api.client.http.HttpTransport;
import com.google.api.client.http.javanet.NetHttpTransport;
import com.google.api.client.json.JsonFactory;

@Configuration
public class GoogleApiConfiguration {

@Bean
public HttpTransport httpTransport() {
return new NetHttpTransport();
}

@Bean
public JsonFactory jsonFactory() {
return JacksonFactory.getDefaultInstance();
}
}
package coms.configuration;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.google.api.client.http.HttpTransport;
import com.google.api.client.http.javanet.NetHttpTransport;
import com.google.api.client.json.JsonFactory;

@Configuration
public class GoogleApiConfiguration {

@Bean
public HttpTransport httpTransport() {
return new NetHttpTransport();
}

@Bean
public JsonFactory jsonFactory() {
return JacksonFactory.getDefaultInstance();
}
}
dan1st
dan1st7mo ago
also you need google-http-client-jackson2 for JacksonFactory not just jackson-core
Tomasm21
Tomasm21OP7mo ago
I kinda tried it. But then Jaksonfactory was underlined in yellow and it says that deprecated ok I will try again
dan1st
dan1st7mo ago
oh right
No description
Tomasm21
Tomasm21OP7mo ago
dan1st
dan1st7mo ago
and specifically google-http-client-gson instead of google-http-client-jackson2
Tomasm21
Tomasm21OP7mo ago
I hope this is ok:
Tomasm21
Tomasm21OP7mo ago
No description
dan1st
dan1st7mo ago
you probably don't need jackson-core any more but yeah looks alright
Tomasm21
Tomasm21OP7mo ago
I don't get it:
No description
dan1st
dan1st7mo ago
the package name is different remove the import and let autocomplete create the import I think it would be com.google.api.client.json.gson.GsonFactory or something like that
Tomasm21
Tomasm21OP7mo ago
No description
Tomasm21
Tomasm21OP7mo ago
right But I'm not sure this is ok
dan1st
dan1st7mo ago
probably ok, yeah alternatively you could use GsonFactory.getDefaultInstance()
Tomasm21
Tomasm21OP7mo ago
ok Gson is now ok. Please, - help me to fix the BloggerServiceConfiguration.
dan1st
dan1st7mo ago
idk what is there to fix
Tomasm21
Tomasm21OP7mo ago
@Configuration
public class BloggerServiceConfiguration {
//@Value("${GOOGLE_CLIENT_ID}")
private String googleClientId;

private final HttpTransport httpTransport;
private final JsonFactory jsonFactory;
private final OAuth2AuthorizedClientService authorizedClientService;

public BloggerServiceConfiguration(HttpTransport httpTransport,
JsonFactory jsonFactory,
OAuth2AuthorizedClientService authorizedClientService,
@Value("${GOOGLE_CLIENT_ID}") String googleClientId) {
this.httpTransport = httpTransport;
this.jsonFactory = jsonFactory;
this.authorizedClientService = authorizedClientService;
this.googleClientId = googleClientId;
}

@Bean
public Blogger bloggerService() {
OAuth2AuthorizedClient authorizedClient = authorizedClientService.loadAuthorizedClient(googleClientId, null);
String accessToken = authorizedClient.getAccessToken().getTokenValue();
HttpRequestInitializer requestInitializer = request -> request.getHeaders().setAuthorization("Bearer " + accessToken);

return new Blogger.Builder(httpTransport, jsonFactory, requestInitializer)
.setApplicationName("Web client 1")
.build();
}
}
@Configuration
public class BloggerServiceConfiguration {
//@Value("${GOOGLE_CLIENT_ID}")
private String googleClientId;

private final HttpTransport httpTransport;
private final JsonFactory jsonFactory;
private final OAuth2AuthorizedClientService authorizedClientService;

public BloggerServiceConfiguration(HttpTransport httpTransport,
JsonFactory jsonFactory,
OAuth2AuthorizedClientService authorizedClientService,
@Value("${GOOGLE_CLIENT_ID}") String googleClientId) {
this.httpTransport = httpTransport;
this.jsonFactory = jsonFactory;
this.authorizedClientService = authorizedClientService;
this.googleClientId = googleClientId;
}

@Bean
public Blogger bloggerService() {
OAuth2AuthorizedClient authorizedClient = authorizedClientService.loadAuthorizedClient(googleClientId, null);
String accessToken = authorizedClient.getAccessToken().getTokenValue();
HttpRequestInitializer requestInitializer = request -> request.getHeaders().setAuthorization("Bearer " + accessToken);

return new Blogger.Builder(httpTransport, jsonFactory, requestInitializer)
.setApplicationName("Web client 1")
.build();
}
}
Tomasm21
Tomasm21OP7mo ago




dan1st
dan1st7mo ago
you don't need @Value on your field if you have it in the constructor authorizedClientService.loadAuthorizedClient(googleClientId, null); I think the null here is the issue
Tomasm21
Tomasm21OP7mo ago
yes I think it too.
dan1st
dan1st7mo ago
the name of the End-User Principal (Resource Owner)
Tomasm21
Tomasm21OP7mo ago
I want to use Google's Blogger service through Blogger API. To create there blogs and add images using my SB app. I don't authenticate to my Spring Boot app using OAuth2 I have my default username and password system. Users are saved to local database But I don't know what exactly to use as the resource owner I created Web client 1 on Google Cloud Credentials and I got Client ID and Client Secret. I save d those values to the application.properties
dan1st
dan1st7mo ago
I think loadAuthorizedClient is for users trying to connect with your application but idk
Tomasm21
Tomasm21OP7mo ago
AI says it's my principal name if my Spring Boot app authenticates using OAuth2. But it's not the case. I have my custom authentication mechanism like I told. So I don't need to use OAuth2AuthorizedClient at all I will try to access Google's Blogger API without so called OAuth2 But in my application properties I have:
# Spring Security Oauth2 properties
spring.security.oauth2.client.registration.google.client-id=${GOOGLE_CLIENT_ID}
spring.security.oauth2.client.registration.google.client-secret=${GOOGLE_CLIENT_SECRET}
# Spring Security Oauth2 properties
spring.security.oauth2.client.registration.google.client-id=${GOOGLE_CLIENT_ID}
spring.security.oauth2.client.registration.google.client-secret=${GOOGLE_CLIENT_SECRET}
Tomasm21
Tomasm21OP7mo ago
But here it says about authentication: https://developers.google.com/blogger/docs/3.0/using
Google for Developers
Blogger API: Using the API  |  Google for Developers
Learn to set up and authorize the Blogger API to integrate Blogger content with your application.
Tomasm21
Tomasm21OP7mo ago
Every request your application sends to the Blogger APIs needs to identify your application to Google. There are two ways to identify your application: using an OAuth 2.0 token (which also authorizes the request) and/or using the application's API key. Here's how to determine which of those options to use:

If the request requires authorization (such as a request for an individual's private data), then the application must provide an OAuth 2.0 token with the request. The application may also provide the API key, but it doesn't have to.
If the request doesn't require authorization (such as a request for public data), then the application must provide either the API key or an OAuth 2.0 token, or both—whatever option is most convenient for you.
Every request your application sends to the Blogger APIs needs to identify your application to Google. There are two ways to identify your application: using an OAuth 2.0 token (which also authorizes the request) and/or using the application's API key. Here's how to determine which of those options to use:

If the request requires authorization (such as a request for an individual's private data), then the application must provide an OAuth 2.0 token with the request. The application may also provide the API key, but it doesn't have to.
If the request doesn't require authorization (such as a request for public data), then the application must provide either the API key or an OAuth 2.0 token, or both—whatever option is most convenient for you.
dan1st
dan1st7mo ago
I think this method is used in case your application is an OAuth2 server so if the client authenticates to your application, not for something to interact with Google APIs What do you want to access? Do you want the user to give you access to something? If yes, you need OAuth2 yeah these things are necessary if you want to do something like - Let users sign in with their Google account - Access something associated with the Google account of users after the users consented
Tomasm21
Tomasm21OP7mo ago
No Dan I will tell you what exactly I want to do. When users make an order in our not real yet e-commerce web app then Order Invoice is created as email-template.html. using Thymeleaf. And I need to add ordered products images to HTML table. Ther are three ways - as content ID, inline embedded image or hosted images url links. Content Ids, and embedded images fail. Gmail and Hotmail blocks them and images are not showed in such an email. But hosted online images URLs works. I tested with real images that were added to my test blog on Blogger. I copied URL and posted into the email-template.html. And in email it was showing. So my purpose is to automate the process. When Order is created at my app then all ordered products images should be taken from the disk and sent to Blogger Automatic process And Blogger should provide me links - URLs that I will add to template and send to user's email Just my Spring should be able to send requests to Blogger API and get responses On behalf of my real account
dan1st
dan1st7mo ago
idk blogger but it doesn't look like you need OAuth2 for that you need OAuth2 if you want to do it on behalf of the user
Tomasm21
Tomasm21OP7mo ago
I think I need Client ID and Client Secret so Blogger API would recognize me as Google account user.
dan1st
dan1st7mo ago
though if you want to create a blog, that might need to be done on behalf of a user
Tomasm21
Tomasm21OP7mo ago
Regarding OAuth2 I;m not sure
dan1st
dan1st7mo ago
For OAuth2, you need a user allowing you to access it on behalf of them client id and cölient secret are specific to OAuth2 But why do you need blogger?
Tomasm21
Tomasm21OP7mo ago
It's free for AWS S3 you have to pay
dan1st
dan1st7mo ago
ah
Tomasm21
Tomasm21OP7mo ago
I don't plan to send there tons of images
Tomasm21
Tomasm21OP7mo ago
But when I added some images:
No description
Tomasm21
Tomasm21OP7mo ago
I was able to get its Urls and paste inside the email_template
dan1st
dan1st7mo ago
Can't you host the image on your website?
Tomasm21
Tomasm21OP7mo ago
and in email it was showing it's on localhost
dan1st
dan1st7mo ago
And then just refer to these images in your E-Mail? well once you run it in production, it will no longer be on localhost
Tomasm21
Tomasm21OP7mo ago
I know. And I don't know how to host that's why I need third party host service
dan1st
dan1st7mo ago
just store the images on your server? and make an endpoint for retrieving them
Tomasm21
Tomasm21OP7mo ago
I don't have a server. Is my Spring Boot app on localhost a server? can gmail access images from it? or hotmail
dan1st
dan1st7mo ago
yes though if you want to allow other users to access your Spring Boot app, you cannot have it on localhost
Tomasm21
Tomasm21OP7mo ago
I know. But right now I seek to test as a user myself
dan1st
dan1st7mo ago
you can just use it make an endpoint that allows you to get the image e.g. /images/yourimage.jpg and then in your E-Mail, you can do <img src="http://localhost/images/yourimage.jpg" />
Tomasm21
Tomasm21OP7mo ago
I have endpoint that returns whole list of product objects including its images but as private byte[] image1; Should I make an endpoint for an image an Image requested by its name?
dan1st
dan1st7mo ago
You need an endpoint allowinjg you to request a specific image by name, by id or by whatever you need some way to get an image and then link to that in your E-Mail
Tomasm21
Tomasm21OP7mo ago
Will it really work? I will make it If it will really work even if my app is on localhost and my computer has Internet connection
dan1st
dan1st7mo ago
it should work. Once you need to refer to the endpoint with http://localhost:YOUR_PORT/PATH/TO/THE/ENDPOINT/WITH/YOUR/IMAGE in your E-Mail
Tomasm21
Tomasm21OP7mo ago
I will try it Thanks for an offer I will close this if I will succeed. I really made an endpoint and it really works locally. But when I send an email-template invoice with images then images are not displayed. If I open an image locally in a browser it is perfectly showing.
dan1st
dan1st7mo ago
Can you show what's shown in the E-Mail client?
Tomasm21
Tomasm21OP7mo ago
yes.. One moment..
Tomasm21
Tomasm21OP7mo ago
No description
Tomasm21
Tomasm21OP7mo ago
<tr th:each="productDTO : ${products}">
<td style="font-size: 14px; font-family: 'Open Sans', sans-serif; color: #646a6e; line-height: 18px; vertical-align: top; padding:10px 0">
<img th:src="${productDTO.externalUrl}" style="height:80px; width:50px;"/>
</td>
<td th:text="${productDTO.product.name}" style="font-size: 14px; font-family: 'Open Sans', sans-serif; color: #e2c707; line-height: 18px; vertical-align: top; padding:10px 0;" class="article">
</td>
<td th:text="${productDTO.size}" style="font-size: 14px; font-family: 'Open Sans', sans-serif; color: #646a6e; line-height: 18px; vertical-align: top; padding:10px 0;" align="center">
</td>
<td th:text="${productDTO.quantity}" style="font-size: 14px; font-family: 'Open Sans', sans-serif; color: #646a6e; line-height: 18px; vertical-align: top; padding:10px 0;" align="center">
</td>
<td th:text="'₹' + ${productDTO.product.price}" style="font-size: 14px; font-family: 'Open Sans', sans-serif; color: #1e2b33; line-height: 18px; vertical-align: top; padding:10px 0;" align="right">
</td>
<tr>
<td height="1" colspan="5" style="border-bottom:1px solid #e4e4e4"></td>
</tr>
</tr>
<tr th:each="productDTO : ${products}">
<td style="font-size: 14px; font-family: 'Open Sans', sans-serif; color: #646a6e; line-height: 18px; vertical-align: top; padding:10px 0">
<img th:src="${productDTO.externalUrl}" style="height:80px; width:50px;"/>
</td>
<td th:text="${productDTO.product.name}" style="font-size: 14px; font-family: 'Open Sans', sans-serif; color: #e2c707; line-height: 18px; vertical-align: top; padding:10px 0;" class="article">
</td>
<td th:text="${productDTO.size}" style="font-size: 14px; font-family: 'Open Sans', sans-serif; color: #646a6e; line-height: 18px; vertical-align: top; padding:10px 0;" align="center">
</td>
<td th:text="${productDTO.quantity}" style="font-size: 14px; font-family: 'Open Sans', sans-serif; color: #646a6e; line-height: 18px; vertical-align: top; padding:10px 0;" align="center">
</td>
<td th:text="'₹' + ${productDTO.product.price}" style="font-size: 14px; font-family: 'Open Sans', sans-serif; color: #1e2b33; line-height: 18px; vertical-align: top; padding:10px 0;" align="right">
</td>
<tr>
<td height="1" colspan="5" style="border-bottom:1px solid #e4e4e4"></td>
</tr>
</tr>
Service method fragment:
List<OrderInvoiceDto> productDTOs = new ArrayList<>();
for (ProductQuantity productQuantity : orderCreated.getProducts()) {
Product product = productQuantity.getProduct();
byte[] imageData = getImageFromFile(product.getHoverImage().getFilePath());
String base64Image = Base64.getEncoder().encodeToString(imageData);

OrderInvoiceDto productDTO = new OrderInvoiceDto();
productDTO.setProduct(product);
productDTO.setSize(productQuantity.getSize());
productDTO.setQuantity(productQuantity.getQuantity());
productDTO.setBase64Image(base64Image);
productDTO.setContentId("attachment-"+product.getHoverImage().getName());
productDTO.setExternalUrl("http://localhost:9400/product/image/"+product.getHoverImage().getName());
productDTOs.add(productDTO);
}
List<OrderInvoiceDto> productDTOs = new ArrayList<>();
for (ProductQuantity productQuantity : orderCreated.getProducts()) {
Product product = productQuantity.getProduct();
byte[] imageData = getImageFromFile(product.getHoverImage().getFilePath());
String base64Image = Base64.getEncoder().encodeToString(imageData);

OrderInvoiceDto productDTO = new OrderInvoiceDto();
productDTO.setProduct(product);
productDTO.setSize(productQuantity.getSize());
productDTO.setQuantity(productQuantity.getQuantity());
productDTO.setBase64Image(base64Image);
productDTO.setContentId("attachment-"+product.getHoverImage().getName());
productDTO.setExternalUrl("http://localhost:9400/product/image/"+product.getHoverImage().getName());
productDTOs.add(productDTO);
}
Remaining fragment:
productDTOs.stream().forEach(item -> System.out.println("Product name: "+item.getProduct().getName()));
productDTOs.stream().forEach(item -> System.out.println("Product image external url: "+item.getExternalUrl()));
// Prepare template variables for email
Map<String, Object> templateVariables = new HashMap<>();
templateVariables.put("products", productDTOs);

String recipientEmail = foundUser.getEmail();

// Send order invoice email
try {
emailUtil.sendOrderInvoiceEmailWithBase64Images(recipientEmail, "Order Invoice", "email-template3", templateVariables);
//emailUtil.sendOrderInvoiceEmailWithContentIdsImages(recipientEmail, "Order Invoice", "email-template3", templateVariables, productDTOs);
} catch (MessagingException e) {
// Handle exception
e.printStackTrace();
// You might want to return an error response in case of email sending failure
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Failed to send order invoice email");
}

return ResponseEntity.ok(orderCreated);
productDTOs.stream().forEach(item -> System.out.println("Product name: "+item.getProduct().getName()));
productDTOs.stream().forEach(item -> System.out.println("Product image external url: "+item.getExternalUrl()));
// Prepare template variables for email
Map<String, Object> templateVariables = new HashMap<>();
templateVariables.put("products", productDTOs);

String recipientEmail = foundUser.getEmail();

// Send order invoice email
try {
emailUtil.sendOrderInvoiceEmailWithBase64Images(recipientEmail, "Order Invoice", "email-template3", templateVariables);
//emailUtil.sendOrderInvoiceEmailWithContentIdsImages(recipientEmail, "Order Invoice", "email-template3", templateVariables, productDTOs);
} catch (MessagingException e) {
// Handle exception
e.printStackTrace();
// You might want to return an error response in case of email sending failure
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Failed to send order invoice email");
}

return ResponseEntity.ok(orderCreated);
Tomasm21
Tomasm21OP7mo ago
Console output:
No description
Tomasm21
Tomasm21OP7mo ago
Local image:
No description
Tomasm21
Tomasm21OP7mo ago
of the http://localhost:9400/product/image/banana5.jpg
Tomasm21
Tomasm21OP7mo ago
But initial reequest was called from the frontend:
No description
Tomasm21
Tomasm21OP7mo ago
2 products - bananas and tomatoes It was successful request and response. Database is filled with the order. Just email with empty images. And the controller for image return:
Tomasm21
Tomasm21OP7mo ago
No description
Tomasm21
Tomasm21OP7mo ago
And its service method:
@Transactional(readOnly = true)
public ResponseEntity<?> getImageByName(String imageName) {
List<Product> products = productRepo.findAll();

if(products.size() == 0) {
Map<String, Object> body = new LinkedHashMap<>();
body.put("timestamp", LocalDateTime.now());
body.put("message", "No products found and thus no images");
return new ResponseEntity<Map<String, Object>>(body, HttpStatus.NOT_FOUND);
}else {
String foundPath = "";
String foundType = "";
for(Product product : products) {
if(product.getHoverImage().getName().equals(imageName)) {
foundPath = product.getHoverImage().getFilePath();
foundType = product.getHoverImage().getType();
break;
}
}
if(!foundPath.isBlank()) {
FileSystemResource file = new FileSystemResource(foundPath);
return ResponseEntity.ok()
.contentType(MediaType.parseMediaType(foundType))
.body(file);
}else {
Map<String, Object> body = new LinkedHashMap<>();
body.put("timestamp", LocalDateTime.now());
body.put("message", "No images found by the provided image name");
return new ResponseEntity<Map<String, Object>>(body, HttpStatus.NOT_FOUND);
}
}
}
@Transactional(readOnly = true)
public ResponseEntity<?> getImageByName(String imageName) {
List<Product> products = productRepo.findAll();

if(products.size() == 0) {
Map<String, Object> body = new LinkedHashMap<>();
body.put("timestamp", LocalDateTime.now());
body.put("message", "No products found and thus no images");
return new ResponseEntity<Map<String, Object>>(body, HttpStatus.NOT_FOUND);
}else {
String foundPath = "";
String foundType = "";
for(Product product : products) {
if(product.getHoverImage().getName().equals(imageName)) {
foundPath = product.getHoverImage().getFilePath();
foundType = product.getHoverImage().getType();
break;
}
}
if(!foundPath.isBlank()) {
FileSystemResource file = new FileSystemResource(foundPath);
return ResponseEntity.ok()
.contentType(MediaType.parseMediaType(foundType))
.body(file);
}else {
Map<String, Object> body = new LinkedHashMap<>();
body.put("timestamp", LocalDateTime.now());
body.put("message", "No images found by the provided image name");
return new ResponseEntity<Map<String, Object>>(body, HttpStatus.NOT_FOUND);
}
}
}
I'm sure that is because of the localhost. If I would add an image with public URL then the image inside the email message would be shown I already tried. If my project would be in production (on public server) then the image would be shown in the email. I'm sure of it. And right now I am trying to configure Blogger API. Everything there becomes public. I need automatic images upload from my server in localhost to Google's Blogger.
dan1st
dan1st7mo ago
what'S shown when hovering over an image? yeah that will probably not work if you use the gmail website I thought you would use a proper local E-Mail client on your machine Just use a normal E-Mail client and you can test it with one that runs in your browser as soon as you have deployed it
JavaBot
JavaBot7mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Tomasm21
Tomasm21OP7mo ago
On desktop PC I don't use local client programs for gmail. It's enough to open my gmail email service in browser.
dan1st
dan1st7mo ago
Well if you want it to work, you need a local client once you put it on a proper domain, that shouldn't be necessary any more
Tomasm21
Tomasm21OP7mo ago
On mobile phone I have special local program "Gmail" that also opens my inbox. And I recently checked it out. There are no images too. And also when you hover mouse pointer over an image it also doesn't make an image to appear.
dan1st
dan1st7mo ago
Well it needs to be available on localhost which is the case on your computer while the server is running your mobile is not your computer and the gmail server is also not running on your computer
Tomasm21
Tomasm21OP7mo ago
I think that on local client for gmail on desktop pc the result would be the same. For remote gmail server localhost means internal network for that remote gmail server. And it doesn't have hosted endpoint to get the image.
dan1st
dan1st7mo ago
idk what gmail does
Tomasm21
Tomasm21OP7mo ago
Except that you are sure that localhost should really work through remote gmail server.
dan1st
dan1st7mo ago
but normal E-Mail clients that are not specific to the provider don't have that problem
Tomasm21
Tomasm21OP7mo ago
Gmail and hotmail as massive world level email providers should be normal. Maybe I don't know what is client. Or maybe you are laughing at me and say that Gmail should be local on my local network and only then I would get images in my inbox. All in all, - most likely I should make public url links to my images.
JavaBot
JavaBot7mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Want results from more Discord servers?
Add your server