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 942767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:19:41+00:00 2026-05-15T22:19:41+00:00

I am using plupload to perform multipart file uploads. On success, it returns the

  • 0

I am using plupload to perform multipart file uploads. On success, it returns the serverdata that was stored. But i am receiving a string instead of an object containing all my attributes.

This is my controller action:

  def upload
      @user = User.create! :name => params[:photo_name], :swf_uploaded_data => params[:photo]
        respond_to do |format|
          format.js { render :json => @user) }
        end
  end

In my Javascript, i have a function that returns the server response, the gist of which is:

  function(serverResponse) {
    alert(serverResponse);
  });

The output of the serverResponse happens to be a string!! (Ex:

"{'user': {'name':'photo','link':'http://www.google.com/favicon.ico'}}")

Now i just cannot access the link by just doing serverResponse.user.link because it is not a serialized output. How do i resolve this problem?

  • 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-05-15T22:19:42+00:00Added an answer on May 15, 2026 at 10:19 pm

    Parse the JSON. See http://www.json.org/js.html for a more secure method than eval.

    Notably var finalObject = JSON.parse(jsonString);

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

Sidebar

Related Questions

I'm using Plupload to manage file uploads for my site. When I configure Plupload
I am using plupload plugin to upload multiple files. That works fine. In Files
I am using plupload ( http://www.plupload.com ) script and it's working ok but it
I'm using plupload to make an ajax file uploading. Now the plupload.Uploader class has
I have built working VB.net code that uploads multiple images to the server using
I'm using the Plupload file uploader within a form. I want to customize it
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
I am using Plupload with codeignitor. My problem is i cant create new folder
using chrome 15 on osx 10.6.8 When adding event listeners, I've found that putting
Using Browserlab, it appears that the background image is not centred in Firefox7 for

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.