Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8704807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:12:12+00:00 2026-06-13T03:12:12+00:00

I have a web application where the user has a list of images from

  • 0

I have a web application where the user has a list of images from the server like so:

 <div class="uncat">
        <img src="/static/media/images/2012/1019/zKGsa.jpg" id="12"/>
      </div>
        <div style="float:left;"><a href="/delete/12/">x</a></div>

      <div class="uncat">
        <img src="/static/media/images/2012/1019/vk5au.jpg" id="11"/>
      </div>
        <div style="float:left;"><a href="/delete/11/">x</a></div>

      <div class="uncat">
        <img src="/static/media/images/2012/1019/main-qimg-fa20c3f66a50e7a28c4e425b388303fc.jpeg" id="10"/>
      </div>

Then the user can drag and drop any image into a select area with the following Javascript:

addEvent(bin, 'drop', function(e) {
if (e.stopPropagation)
  e.stopPropagation();

  var csrftoken = getCookie('csrftoken');

  // AJAX call 
  $.post('/image_in_folder/', {

    // figure out better way to retrieve id
      // id not passed from masonry
    image:DRAGSOURCE.id,
    folder:this.id,
    'csrfmiddlewaretoken': csrftoken  
  }, function(data){
      console.log(data);
  });
}

});

What non-client-side information can I POST over to identify the meme the user dragged? Currently, I use the ‘id’ attribute as a temporary solution. But users could potentially modify the data to hijack the drag-and-drop.

Any help would be appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T03:12:14+00:00Added an answer on June 13, 2026 at 3:12 am

    What non-client-side information can I POST

    None. The POST request comes from the client. You can only send information that is available to the client.

    Currently, I use the ‘id’ attribute as a temporary solution. But users could potentially modify the data

    So authenticate the user, then check if they are authorised to upload a file for that id.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web application in which a user has to upload images to
I have several list boxes in my web application that user has to fill.
I am creating a web application that will have many users. Each user has
I have a web application that has a grid displaying a paged list of
Currently I have a web application where a user can use dropdown lists to
I have a web application that allows a user to view family members. When
I have a web application inside where i need to check whether the user
I have a web application where in I check if the user is inactive
I have created a site collection inside a web application with user A as
I have a web application that functions as a dashboard, allowing a user to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.