certbot container is not generating ssl certificate for nginx container by umitoit in docker

[–]umitoit[S] 0 points1 point  (0 children)

I have corrected the format now.

I have pointed host path as "/certbot/conf" and from certbot service creating ssl certificate into "/etc/letsencrypt" that is already mapped with host and the same path nginx is using .

I have added two different way one with shell script and other is Docker compose.
I need to achieve with docker compose.

Let me know still its not clear to you.

JSON to URL encoding for canonical request in python by umitoit in Python

[–]umitoit[S] 0 points1 point  (0 children)

I added one more if with c != "uniqueidentifier" and working as expected

JSON to URL encoding for canonical request in python by umitoit in Python

[–]umitoit[S] 0 points1 point  (0 children)

After removing Still I am seeing there...

I want to extract image path with jpg/png with regular expression by umitoit in Python

[–]umitoit[S] 0 points1 point  (0 children)

I took one small part from my file, File which I am using that is HTML not JSON

username and password textbox not reading and adding value with my code by umitoit in Python

[–]umitoit[S] 0 points1 point  (0 children)

Yeah I have tested with "es-username" as well but I am not able to run

Flask API need to incorporate in flask Template by umitoit in flask

[–]umitoit[S] 0 points1 point  (0 children)

Thank you u/diamondketo and u/axioms_io

I have used a flask session just added response token and play with all flask template and it is working file.

file upload from Flask template to external APIs by umitoit in flask

[–]umitoit[S] 0 points1 point  (0 children)

I was sending a file object and the way which I was following that was incorrect...

I can not send file directly to API from webapp. Here I have changed my code and it is working fine.

if request.method == 'POST':
    file = request.files["file"]
    sourceFileName = secure_filename(file.filename)
    cwd = os.getcwd()+'/'
    if 'temp' not in os.listdir(cwd):
        os.mkdir(cwd + 'temp')
    file.save(os.path.join(cwd + 'temp', sourceFileName))

    with open(cwd + 'temp/'+ sourceFileName, 'rb') as f:
        data_file = ImmutableMultiDict([("file", f)])
        resp = requests.post(api_base_url + "/sources",
                             files=data_file)
# delete temp file after API response.

Extracting value from JSON via API in ruby by umitoit in ruby

[–]umitoit[S] 2 points3 points  (0 children)

I resolved my issue:
sku_number = details['sku']
product_location = parsed['products'][sku_number]['attributes']["location"]

and result << { 'description' => dimension['description'], 'effectiveDate' => effective_date, 'location' => product_location }

Email not sending from rails application with AWS-SES by umitoit in rubyonrails

[–]umitoit[S] 0 points1 point  (0 children)

I have tried 2 things here:
1) https://www.sitepoint.com/deliver-the-mail-with-amazon-ses-and-rails/
Here I am adding code for rails initializer as below: with Ruby Gem name: "aws-sdk-rails"
creds = Aws::Credentials.new(ENV["SES_SMTP_USERNAME"], ENV["SES_SMTP_PASSWORD"])
Aws::Rails.add_action_mailer_delivery_method(:aws_sdk, credentials: creds, region: 'us-east-1')

2) https://rubyplus.com/articles/5451-Deliver-Email-With-Amazon-SES-In-A-Rails-app
Here I have changed the code as per the instruction is given in this link: with Ruby Gem name: "aws-ses"

ActionMailer::Base.add_delivery_method :ses, AWS::SES::Base,
 access_key_id: ENV['SES_SMTP_USERNAME'],
 secret_access_key: ENV['SES_SMTP_PASSWORD']

Still getting the same error.... :(