Simple jquery to test FORM’s total Upload Size not working

Warning ... I am not a JAVA programmer so please be kind ... thanks for any help you can provide.
Retired bit basher looking for a bit of help with a non-profit project.

The code listed below was based on an online example that I found on js fiddle dot net ref 9bhcB 1220 relating to testing total attachment sizes on a web page.

Issue: WP 3rd party FORM with several Upload Fields, generated with VFB Pro Form plugin, ends with a blank screen if the submitted form's total size of all attachments exceeds the WP/PHP Upload LIMIT ... this LIMIT is in place to ensure EMAIL LIMITS aren't exceeded. As attachments are emailed for further processing, their size in total, shouldn't exceed an 8M email limit (while this limit seems to differ between providers, it has always worked for me)

While one could use individual field Size restrictions, as some upload fields are optional, was hoping for simplicity and ease of use to do a FORM level MAX file check instead.

VFB Pro defines CLASS vfb-fieldType-file-upload for its upload fields ... using a WP page, the following hidden JQuery is included in the HTML editor ... the script is supposed to sum all of the upload field sizes (denoted by class name) anytime there is a change to any of these fields ... the result valid should be false if totalSize exceeds 8M and is supposed to pop up an error message then disable the submit button ... nothing appears to happen when attaching a file or files that exceed the limit ... the Submit button ID is vfb-field-1234 ... not sure how to debug this ... wondering if this may be due to the document ready function not being coded properly

<pre hidden=""> 
 <script>
 $("document").ready(function() {
 $(".vfb-fieldType-file-upload").on('change', function() {
    var totalSize = 0;
    $(".vfb-fieldType-file-upload").each(function() {
      console.dir(this); 
      for (var i = 0; i < this.files.length; i++ {
        totalSize += this.files[i].size;
      }
     });
     var valid = totalSize <= 8192000;
     if (!valid)
      alert('Over MAX File Size');
     $("#vfb-field-1234").prop("disabled", !valid);
   }); 
});
 </script>
</pre>

In another instance where I used a jQuery with a VFB form, I used this variation of "ready" for setting up an ajax request

 var xmlhttp = new XMLHttpRequest();
  xmlhttp.onreadystatechange = function() {
   if (this.readyState == 4 && this.status == 200) {
    jQuery('#rslt').html(this.responseText);

Wondering if this more explicit variation of ready is required?

Without dev tools, is there a way to debug these scripts?

Possibly some way to indicate the current progress of any part of the script using a debug message of some sort?

Again thanks in advance for any assistance you can provide

Spring OAuth Server: Default Configuration

Spring has come out with an OAuth2 solution, and in this article, we will look at the default configuration that comes bundled with the spring-oauth server. Details about how OAuth2.0 works are out of the scope of this article and the audience of this article is expected to have a basic understanding of it. You can find more details on it here.

In this and other articles, I will talk more about the technical aspects of the Spring OAuth2.0 solution.

The Overlooked Strategy for Data Management: Bridging NoSQL and Traditional Databases

As data proliferates across various sectors and industries, database management takes on a new layer of complexity. While traditional databases with their ACID (Atomicity, Consistency, Isolation, Durability) properties continue to hold their ground, NoSQL databases are stealing the limelight, thanks to their scalability and flexibility. One might think that these are two parallel universes, never to intersect, but is that really the case? This article proposes that the integration of NoSQL databases with traditional relational databases isn't just a technical challenge — it's the secret sauce to creating a truly robust and versatile data management strategy.

The Dichotomy and the Dialogue

Let's start by appreciating the differences between these two database types. Traditional databases are the stalwarts of complex queries, joins, and transactions. They've been optimized to excel in environments that require strict data consistency and integrity.

How to Upload Photos from Adobe Lightroom to WordPress

Do you want to add photos from Adobe Lightroom to your WordPress website?

Many photographers use Adobe Lightroom to edit photos before uploading them to WordPress. While editing photos is essential, manually uploading them to WordPress can be a time drain.

In this article, we will show you how to easily upload photos from Adobe Lightroom to WordPress with just one click.

How to upload photos from Adobe Lightroom to WordPress

What is Adobe Lightroom?

Adobe Lightroom is a photo editing suite that helps you make basic changes and adjustments to your images. It is part of Adobe’s Creative Cloud and includes other tools like Photoshop and Illustrator.

Adobe Lightroom lets you manage your pictures and make finishing touches, like adjusting the exposure, contrast, cropping, and more. It is different from Adobe Photoshop, as you don’t get a wide range of editing capabilities and features in Lightroom as you’d get in Photoshop.

Adobe Lightroom is more suitable for professional photographers who want to create a collection and do basic editing.

With the right WordPress plugin, you can connect your Lightroom account to your site and easily upload pictures from your collection.

Let’s see how you can get started.

Requirements for Uploading from Adobe Lightroom to WordPress

First, you will need Adobe Lightroom Classic installed on your computer. Any version after Lightroom 6 or Creative Suite would work. For this, you’ll need to visit the Adobe Creative Cloud website and sign up for an account.

Sign up for adobe creative cloud

Secondly, we will be using Envira Gallery, which is the best gallery plugin for WordPress. It allows you to create beautiful responsive image galleries in WordPress.

Envira Gallery offers a Lightroom Addon, which is available with their Gold, Platinum, Agency, and Pro licenses. This addon provides seamless integration between Adobe Lightroom and your WordPress site.

Let’s take a look at how you can integrate Adobe Lightroom into WordPress.

Setting Up Envira Gallery in WordPress

The first thing you will need to do is install and activate the Envira Gallery plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, you need to go to the Envira Gallery » Settings page from your WordPress dashboard. You will then need to provide your license key, which can be found on your accounts page on the Envira Gallery website.

Activating the Envira Gallery WordPress plugin

Go ahead and click the ‘Verify Key’ button.

After verifying your license key, you need to go to Envira Gallery » Addons and scroll down to locate the Lightroom Addon.

Next, you can click on the ‘Install’ button.

Install Lightroom addon

Envira Gallery will install the Lightroom addon, and then you need to click on the activate button to enable it.

Next, you will need to go to the Envira Gallery » Settings page and click the ‘Lightroom’ tab.

Lightroom settings in Envira

Here, you will see two options. First, you need to choose the user account you want to use for publishing images from Lightroom. Second, you need to generate an access token.

Simply click on the ‘Generate New Access Token’ button and copy the token as you will need it in the next step.

Don’t forget to click on the Save button to store your settings.

Setting Up Adobe Lightroom Classic on Your Computer

Next, you’ll need to install and set up the Adobe Lightroom Classic app on your computer.

To start, simply visit the Adobe Creative Cloud website and click the ‘Your Creative Cloud’ button at the top. Make sure you’re signed in to your Adobe account.

Go to your creative cloud app

After that, you’ll see your Creative Cloud homepage.

Go ahead and click the ‘Install Creative Cloud app’ option in the right corner under your user name.

Click install creative cloud app

Next, you can save the download file on your computer and install it.

Upon installation, open the Creative Cloud app on your computer. From here, you can go to the ‘Apps’ section and then navigate to Lightroom Classic.

Try Lightroom classic

Go ahead and click the ‘Try’ button under Lightroom Classic.

Next, you’ll need to select a subscription plan. Adobe offers a 7-day free trial, so you can pick a plan and click the ‘Continue’ button.

Select billing for Lightroom classic

After completing the subscription process, Lightroom Classic will start to install on your computer.

Connect Adobe Lightroom Classic to Envira Gallery

Next, you need to install the Envira Gallery addon for Adobe Lightroom.

You can do this by visiting your Envira account area and switching to the ‘Downloads’ tab.

Go to Envira downloads tab

From here, you’ll need to scroll down and navigate to the ‘Lightroom Addon (Adobe)’ option.

Go ahead and click the download icon under the addon.

Download the Lightroom addon

Next, you can save the zip file for the addon on your computer.

In your computer’s downloads folder, you should now see a file enviralrplugin.zip. You need to extract this file because it contains a file named envira.lrplugin.

Mac users can simply double-click the file to unzip it. Windows users can right-click the file and extract its content.

Next, you need to open Adobe Lightroom and click on File » Plugin Manager in the toolbar.

Go to plugin manager

This will bring up the plugin manager window.

Go ahead and click on the Add button and select the ‘envira.lrplugin’ file from your computer.

Add new plugin addon to Lightroom

When you’ve added Enivra addon folder, simply click ‘Done’ to close the plugin manager window.

You should now see Envira Gallery in Adobe Lightroom Classic under the Publish Services section.

View Envira under publish services

You have successfully added Envira Gallery as a publishing service to Adobe Lightroom.

Now that we have setup both Envira Gallery and Lightroom, the next step is to allow Lightroom to speak with Envira Gallery on your WordPress site.

Simply open Adobe Lightroom Classic app and click on the ‘Set Up’ link next to Envira Gallery under the Publish Services panel.

Set up Envira in Lightroom

This will bring up the publishing services manager window.

You will need to provide the address of your WordPress website and the access token you generated earlier.

Enter WordPress access token in Lightroom

Once you do that, click on the ‘Authenticate’ button.

Lightroom will now connect to your WordPress site, and you will see a success message when it has connected to your website successfully.

Successfully connect Envira

Go ahead and click the ‘OK’ button on the success message and then click on the Save button in the publishing services manager window.

Uploading Photos From Lightroom to WordPress

Now you can easily upload photos from Adobe Lightroom Classic to WordPress using Envira Gallery.

Simply start by going into Adobe Lightroom and then right-clicking on Envira under the Publish Services panel. After that click on the ‘Create Published Collection’ option from the menu.

Click create published collection

This will bring up a popup window where you need to provide a name for your collection.

It is important to note that this name will also become the name of your image gallery on your WordPress site.

Enter name of image collection

Once you have chosen the name, click on the Create button to continue. Lightroom will now create an empty collection for you. You can drag and drop images from your library into your new collection.

As soon as you add, remove, or edit images in a collection, you will see a Publish button appear below it. Clicking on the Publish button will upload your photos to WordPress and store them in your Envira Gallery.

Publish your Lightroom collection

You can continue editing your images in Lightroom, make changes, add or remove images, and do anything you want. You can always click on the publish button and your Envira Gallery will get updated because this addon keeps Lightroom synchronized with WordPress.

You can visit your WordPress admin area and go to Envira Gallery to see your Lightroom collection added as a gallery.

View Lightroom collection in Envira

For more details, please see our guide on how to create image galleries with Envira Gallery

We hope this article helped you learn how to upload photos from Adobe Lightroom to WordPress. You may also want to see our guide on image SEO and how to choose the best design software.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Upload Photos from Adobe Lightroom to WordPress first appeared on WPBeginner.

AWS HIPAA Compliance Best Practices You Should Be Aware Of

Are you someone who is looking to ensure the data privacy and security of your healthcare data? Then you’ve come to the right place. In this article, we will dive deep into AWS HIPAA compliance and provide some of the best practices you should follow for making your enterprise healthcare solutions robust and secure. 

When working in the healthcare sector, there’s no room for complacency as you’re dealing with the most sensitive information, such as patient data, vaccination information, diagnosis reports, etc. The Health Insurance Portability and Accountability Act (HIPAA) sets stringent standards and regulations for providers of healthcare solutions.

Hyper-V and Cloud Computing

Cloud computing has emerged as a transformative force in the field of technology, revolutionizing the way businesses and individuals access and utilize computing resources. Hyper-V, Microsoft’s virtualization platform, plays a crucial role in cloud computing infrastructures, providing a scalable and secure virtualization foundation. In this article, we will explore the symbiotic relationship between Hyper-V and cloud computing, highlighting the benefits and synergies they offer.

Hyper-V: Enabling Cloud Virtualization

Hyper-V serves as a fundamental component in cloud computing environments, enabling efficient and flexible virtualization of resources. By leveraging Hyper-V, cloud service providers can optimize hardware utilization by running multiple virtual machines (VMs) on a single physical server. This consolidation leads to cost savings, energy efficiency, and streamlined management of resources, making cloud services more accessible and affordable.

Advancing IoT Security: IoT Security Analytics Tools

The advent of the Internet of Things (IoT) has ushered in a new era of connectivity, revolutionizing various sectors, including homes, industries, and urban areas. However, this widespread connectivity also brings about significant security challenges, necessitating robust threat detection and response mechanisms. IoT Security Analytics Tools have emerged as pivotal components for addressing these challenges, harnessing advanced machine learning techniques to identify unusual behavior patterns and potential threats within IoT networks. This article explores the essential role that IoT Security Analytics Tools play in enhancing IoT security.

The Complexity of IoT Security

Securing IoT environments presents distinct challenges:

The Best Programming Languages for Kids

Teaching kids to program is not just about technicalities or computers. It is about unlocking their potential and instilling some of the most crucial life skills that help them survive in the ever-evolving technological world. In this article, we will find out the importance of teaching coding to kids as well as list some of the best programming languages that can be introduced at an early age. 

Why Teach Kids to Code?

Coding has become one of the most crucial skills to have in the 21st century. It is no longer considered as a skill for professionals or experts. Here are some of the major advantages of teaching coding to kids can have

Top Software Development Trends 2023

The software industry is growing incredibly fast, and the ever-changing technological advancements are the primary reason. Organizations around the globe are increasing their tech budget every year. Adapting newer technologies helps a business stay ahead of the competition.

Let’s Highlight Some Software Development Trends of 2023

Cloud Computing

The world of software development has seen changes in how information is stored, communicated, and exchanged. Cloud computing is not a new trend and offers modern organizations a range of benefits like improved scalability, cost savings, and more. 

Making the Most of Your Testing Resources

Because testing is so low-profile at the top of the food chain, many people regard it as another expense center. If companies tighten their belts, testing organizations will have to do more with less (or less). However, most QA teams and others need to be more staffed and able to meet business objectives. So, how are they going to do the task now? 

The solution is straightforward. We must consider how to do things more effectively to accomplish more (and better) with what we have. Then, we must go further than our walls to see if new technology and tool developments may enable these changes. 

Be Anything You Want, but Not a Programmer

Here’s a valuable piece of advice for anyone embarking on a new learning journey: disregard individuals who derive pleasure from belittling beginners. Some individuals take delight in undermining novices, perhaps out of insecurity or past experiences of being bullied, which gives them a misguided sense of power. Regardless of their reasons, if someone is trying to make you feel inadequate for trying something new, don’t pay attention to them. They simply lack empathy.

Back in 2012, Jeff Attwood wrote an article advising against learning how to code. I can’t help but wonder if he’ll give the same advice to his own children when they express a desire to follow in their father’s footsteps. It’s highly unlikely. He’ll likely enthusiastically guide them through the coding process, emphasizing how enjoyable and rewarding it can be encouraging them to pursue it wholeheartedly. Yet, according to his previous stance, coding is a pursuit exclusively reserved for Jeff and his kids.

Unveiling 24 Pearls of My Executive Odyssey

As I stand on the threshold of a new chapter, my seven-year journey at Avanade is coming to an end. It's a moment to reflect on the wisdom gained from successes and challenges that have shaped me as a leader.

In October 2016, I embarked on a transformative shift, leaving behind a 13-year tenure at Microsoft to join the dynamic world of Avanade. This transition marked a profound change from Technology Thought Leadership, Strategic partnerships, and Product and platform selling to a focus on Services business, Systems integration domain, solutions engineering, practice development with pseudo P&L responsibilities, GTM strategy, and managing the full solution lifecycle with engaging client interaction (+ and the amazing Accenture counterparts on almost every opportunity).

Transitioning From Groovy to Kotlin for Gradle Android Projects

The world of Android app development is constantly evolving, and so are the tools and languages used to build these apps. Gradle, a popular build system, has been an integral part of Android development for years. In the past, Gradle build scripts for Android projects were written in Groovy, but with the introduction of Kotlin, developers now have the option to write their build scripts in a more modern and concise language. In this article, we'll explore the transition from Groovy to Kotlin for Gradle Android projects and discuss the benefits and steps involved in making this shift.

Why Transition to Kotlin for Gradle?

  1. Modern language: Kotlin is a modern, statically typed language that offers features not present in Groovy, making build scripts more concise and expressive. It is designed to be fully interoperable with Java, which is crucial for Android development.
  2. Type safety: Kotlin is known for its strong type safety, reducing the likelihood of runtime errors. With Groovy, you might encounter runtime issues due to dynamic typing.
  3. Improved tooling support: The Android Studio IDE has excellent support for Kotlin, making it easier to write, read, and maintain Gradle scripts. Code completion, refactoring, and error checking are some of the benefits you'll experience when using Kotlin.
  4. Conciseness: Kotlin's concise syntax can lead to shorter, more readable code. This is particularly beneficial in build scripts, which often involve complex logic.

Transitioning to Kotlin Step-By-Step

Here's a step-by-step guide on how to transition from Groovy to Kotlin for Gradle Android projects:

The Role of AI Ethics: Balancing Innovation with Social Responsibility

Artificial Intelligence (AI) represents a rapidly expanding domain characterized by its swiftly evolving technologies and methodologies. Its transformative potential spans across various sectors of the economy and society. Nonetheless, it’s crucial to acknowledge the ethical dilemmas that AI poses. Companies at the forefront of AI development, alongside businesses, communities, administrations, and individuals incorporating it into their daily lives, must remain mindful of these issues.

The Primary Domains of Artificial Intelligence

AI can be categorized into various domains, each with unique attributes tailored to achieve specific goals in particular applications. These objectives and applications stem from the technical capabilities and specific challenges inherent in the respective domains, addressing diverse use cases.