RichaGupta

RichaGupta

Hi,
I need help in adding cropper with image dropper.


Drag and drop files here or click
to browse your files.
Maximum File Size: 4GB.
    </form>
    <div class="error text-red">
      <%= error_tag f, :listing_images %>  
    </div>
    

  </div>
  <div 
    class='listing-d-images' 
    data-url-delete='<%= HomepieWeb.Router.Helpers.listing_path(HomepieWeb.Endpoint, :listing_image_delete, @workflow_listing.id, "") %>' 
    data-url-delete-temp='<%= HomepieWeb.Router.Helpers.listing_workflow_path(HomepieWeb.Endpoint, :listing_image_delete, @workflow_listing.id, "") %>' 
    data-url-cover='<%= HomepieWeb.Router.Helpers.listing_path(HomepieWeb.Endpoint, :listing_image_put, @workflow_listing.id, "") %>' 
    data-signature-url='<%= HomepieWeb.Router.Helpers.upload_signature_path(HomepieWeb.Endpoint, :create_signature_post) %>'
    data-save-url='<%= HomepieWeb.Router.Helpers.listing_path(HomepieWeb.Endpoint, :upload_image_post, @workflow_listing.id) %>'
    data-csrf_token='<%= @ctoken %>'
  >
    <%= for image <- @workflow_listing.listing_images do %>
      <% isImage = String.starts_with?(image.content_type, "image/") %>
      <div class='image-wrap-0 <%= if image.cover, do: " cover", else: "" %>' data-id="<%= image.id %>">
        <span class='text-green cover-show'>Cover Photo</span>

        <div class='image-wrap <%= if Enum.member?(@images_flagged_for_delete, "#{image.id}"), do: "deleting" %>'>
          <%= if isImage do %>
            <div class='listing-image' style="background-image: <%= Homepie.Properties.ListingImage.css_urls(image) %>"></div>
          <% else %>
            <div class='listing-image'>
              <video class="listing-image-video">
                <source src="<%= Homepie.Properties.ListingImage.original_url(image) %>"  />
              </video>
            </div>
          <% end %>

          <span class='cover cover-show'>
            <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="#FFF"><path d="M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"/></svg>
          </span>

          <%= if !isImage do %>
            <span class='cover cover-play-video'>
              <svg enable-background="new 0 0 32 32" width="40" height="40" version="1.1" viewBox="0 0 32 32"  xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g> <path clip-rule="evenodd" d="M0,16c0,8.836,7.164,16,16,16c8.837,0,16-7.164,16-16   c0-8.837-7.163-16-16-16C7.164,0,0,7.163,0,16z M30.031,16c0,7.72-6.312,14-14.031,14C8.28,30,2,23.72,2,16C2,8.28,8.28,2,16,2   C23.72,2,30.031,8.28,30.031,16z" fill-rule="evenodd"/> <path clip-rule="evenodd" d="M13.08,8.626c-0.056,0.134-0.079,0.276-0.075,0.419v13.942   c-0.024,0.887,1.07,1.38,1.702,0.742l6.899-6.999c0.382-0.386,0.382-1.043,0-1.429L14.715,8.31   C14.221,7.793,13.346,7.966,13.08,8.626C13.025,8.76,13.228,8.259,13.08,8.626C13.025,8.76,13.228,8.259,13.08,8.626   C13.025,8.76,13.228,8.259,13.08,8.626z M19.488,16.016l-4.494,4.559v-9.118L19.488,16.016z"  fill-rule="evenodd"/> </g> </svg>
            </span>
          <% end %>

          <div class='image-actions'>
            <span class='delete pull-right <%= @workflow_listing.status == "approved" && "delete-temp-listing-image" || "delete-listing-image" %>'>
              <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
                <g fill="#FFF" fill-rule="nonzero">
                  <path d="M2 6v8c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V6H2zM12 3V1c0-.6-.4-1-1-1H5c-.6 0-1 .4-1 1v2H0v2h16V3h-4zm-2 0H6V2h4v1z"/>
                </g>
              </svg>
            </span>
            <%= if isImage do %>
              <span class='cover cover-listing-image' title='Set as cover photo'>
                <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="#FFF"><path d="M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"/></svg>
              </span>
            <% else %>
              <span class='cover cover-play-video'>
                <svg enable-background="new 0 0 32 32" width="40" height="40" version="1.1" viewBox="0 0 32 32"  xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g> <path clip-rule="evenodd" d="M0,16c0,8.836,7.164,16,16,16c8.837,0,16-7.164,16-16   c0-8.837-7.163-16-16-16C7.164,0,0,7.163,0,16z M30.031,16c0,7.72-6.312,14-14.031,14C8.28,30,2,23.72,2,16C2,8.28,8.28,2,16,2   C23.72,2,30.031,8.28,30.031,16z" fill-rule="evenodd"/> <path clip-rule="evenodd" d="M13.08,8.626c-0.056,0.134-0.079,0.276-0.075,0.419v13.942   c-0.024,0.887,1.07,1.38,1.702,0.742l6.899-6.999c0.382-0.386,0.382-1.043,0-1.429L14.715,8.31   C14.221,7.793,13.346,7.966,13.08,8.626C13.025,8.76,13.228,8.259,13.08,8.626C13.025,8.76,13.228,8.259,13.08,8.626   C13.025,8.76,13.228,8.259,13.08,8.626z M19.488,16.016l-4.494,4.559v-9.118L19.488,16.016z"  fill-rule="evenodd"/> </g> </svg>
              </span>
          <% end %>
          </div>
        </div>
      </div>
    <% end %>
  </div>
</div>

its urgent.Please help

Showing Posts 1 to 5

kokolegorille

kokolegorille

Please provide more info on what You have tried, and what You want to achieve…

As a side note, this is looking like a job task You have been asked to do, and urgent does not work the same in open source world.

RichaGupta

RichaGupta OP

No Actually i am new for elixir. i have got a project build in elixir. I just need assistance like how it can be achieved,
There is one image dropper and what we need is , User should be able to rotate and crop the image. i have heard about using cropper.js. but not sure how to integrate this.. If anyone here have used it

kokolegorille

kokolegorille

Your question is related to Javascript, not Elixir.

RichaGupta

RichaGupta OP

I am implementing this feature in elixir!!

mindok

mindok

You will need to break the problem down for us. There is a cropper.js part which is not Elixir. What does that create? Where is it meant to go? What approach would you take with another backend language and where are you struggling with Elixir?

— All posts loaded —

Where Next? Top

Trending in Questions Top

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
achenet
Hello, I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind. However, when I launch mix phx.server, I get an error...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
Cxx-mlr
I’m working on a small exercise involving update_in/3, and I came up with this solution: data = %{ name: "Periodic Table", category:...
New
ChrisAmelia
I’ve got trouble wrapping my head around the order in which functions are called in this snippet (from Phoenix’s authentication): toke...
New
dillonoconnor
Is there any way to avoid the Hologram compiler running when using iex? It seems like the front-end code could potentially be disregarded...
New
thiagogsr
** (ArgumentError) expected :max_attempts to be a positive integer, got: {:@, [line: 10, column: 19], [{:max_attempts, [line: 10, column:...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews