EzDevInfo.com

upload interview questions

Top upload frequently asked interview questions

Invalid Bundle Error - "requires launch storyboard"

I keep getting this error when I try to submit my app to the store using Xcode:

ERROR ITMS-90475: "Invalid Bundle. iPad Multitasking support requires launch storyboard in bundle 'com.companyname.appname.'"

Anyone know what this error really means?


Source: (StackOverflow)

CFBundleVersion in the Info.plist Upload Error

"The binary you uploaded was invalid. The key CFBundleVersion in the Info.plist file must contain a higher version than that of the previously uploaded version."

I’m getting this error when I come to upload my application.

I set the updated version to 1.2 on iTunes Connect and have also updated the .plist file to 1.2.

I don’t understand why I am getting this error. Any help would be appreciated. Thanks.


Source: (StackOverflow)

Advertisements

Save image from URL by paperclip

Please suggest me a way to save an image from an URL by Paperclip.


Source: (StackOverflow)

Upload files with HTTPWebrequest (multipart/form-data)

Is there any class, library or some piece of code which will help me to upload files with HTTPWebrequest?

Edit 2:

I do not want to upload to a WebDAV folder or something like that. I want to simulate a browser, so just like you upload your avatar to a forum or upload a file via form in a web application. Upload to a form which uses a multipart/form-data.

Edit:

WebClient is not cover my requirements, so I'm looking for a solution with HTTPWebrequest.


Source: (StackOverflow)

HTML: How to limit file upload to be only images?

With HTML, how do I limit what kind of filetypes can be uploaded?

To easy the user experience, I want to limit file uploads to be only images (jpeg, gif, png).

<form method="post" action="..." enctype="multipart/form-data">
<label for="image">Photo</label>
<input name="image" type="file" />
</form>

Source: (StackOverflow)

Show an image preview before upload

In my HTML form I have input filed with type file for example :

 <input type="file" multiple>

Then I'm selecting multiple files by clicking that input button. Now I want to show preview of selected images before submitting form . How to do that in HTML 5?


Source: (StackOverflow)

How to gracefully handle files that exceed PHP's `post_max_size`?

I'm working on a PHP form that attaches a file to an email, and trying to gracefully handle cases where the uploaded file is too large.

I've learned that there are two settings in php.ini that affect the maxiumum size of a file upload: upload_max_filesize and post_max_size.

If a file's size exceeds upload_max-filesize, PHP returns the file's size as 0. That's fine; I can check for that.

But if it exceeds post_max_size, my script fails silently and goes back to the blank form.

Is there any way to catch this error?


Source: (StackOverflow)

Html helper for

Is there a HTMLHelper for file upload? Specifically, I am looking for a replace of

<input type="file"/>

using ASP.NET MVC HTMLHelper.

Or, If I use

using (Html.BeginForm())

What is the HTML control for the file upload?


Source: (StackOverflow)

How can I select and upload multiple files with HTML and PHP, using HTTP POST?

I have experience doing this with single file uploads using <input type="file">. However, I am having trouble doing uploading more than one at a time.

For example, I'd like to be able to select a series of images, then upload them to the server, all at once.

It would be great to use a single file input control, if possible.

Does anyone know how to accomplish this? Thanks!


Source: (StackOverflow)

How can I upload files asynchronously?

I would like to upload a file asynchronously with jQuery. This is my HTML:

<span>File</span>
<input type="file" id="file" name="file" size="10"/>
<input id="uploadbutton" type="button" value="Upload"/>

And here my Jquery code:

$(document).ready(function () {
    $("#uploadbutton").click(function () {
        var filename = $("#file").val();

        $.ajax({
            type: "POST",
            url: "addFile.do",
            enctype: 'multipart/form-data',
            data: {
                file: filename
            },
            success: function () {
                alert("Data Uploaded: ");
            }
        });
    });
});

Instead of the file being uploaded, I am only getting the filename. What can I do to fix this problem?

Current Solution

I am using the jQuery Form Plugin to upload files.


Source: (StackOverflow)

How do I measure request and response times at once using cURL?

I have a web service that receives data in JSON format, processes the data, and then returns the result to the requester.

I want to measure the request, response, and total time using cURL.

My example request looks like:

curl -X POST -d @file server:port

and I currently measure this using the time command in Linux:

time curl -X POST -d @file server:port

The time command only measures total time, though - which isn't quite what I am looking for.

Is there any way to measure request and response times using cURL?


Source: (StackOverflow)

HTML5 Pre-resize images before uploading

Here's a noodle scratcher.

Bearing in mind we have HTML5 local storage and xhr v2 and what not. I was wondering if anyone could find a working example or even just give me a yes or no for this question:

Is it possible to Pre-size an image using the new local storage (or whatever), so that a user who does not have a clue about resizing an image can drag their 10mb image into my website, it resize it using the new localstorage and THEN upload it at the smaller size.

I know full well you can do it with Flash, Java applets, active X... The question is if you can do with Javascript + Html5.

Looking forward to the response on this one.

Ta for now.


Source: (StackOverflow)

move_uploaded_file gives "failed to open stream: Permission denied " error after all configurations i did

I keep getting this error when trying to configure the upload directory with Apache 2.2 and PHP 5.3 on CentOS.

In php.ini:

upload_tmp_dir = /var/www/html/mysite/tmp_file_upload/

In httpd.conf:

Directory /var/www/html/mysite/tmp_file_upload/>
    Options  -Indexes
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
<Directory /var/www/html/mysite/images/>
                Options -Indexes
</Directory>

CentOS directory permissions:

drwxrwxr-x 2 root root 4096 Nov 11 10:01 images
drwxr-xr-x 2 root root 4096 Nov 12 04:54 tmp_file_upload

No matter what I do, I keep getting this error from PHP when I upload the file:

Warning: move_uploaded_file(images/robot.jpg): failed to open stream: Permission denied in /var/www/html/mysite/process.php on line 78

Warning: move_uploaded_file(): Unable to move '/tmp/phpsKD2Qm' to 'images/robot.jpg' in /var/www/html/mysite/process.php on line 78

As you can see it never did take the configuration from the php.ini file regarding the upload file.

What am I doing wrong here?


Source: (StackOverflow)

How to upload a project to Github

After checking this question I still have no idea how to get a project uploaded to my Git Hub repository.

I'm new to Git Hub and I have no idea what to do. I created a Repository but i want to upload my project to it.

I've looked on the repository page for an upload button of some kind but I haven't seen anything of the sort.

I've looked at the links provided so far but I'm still getting no where. They mention command line, is that Windows command line or Git Bash? Because I can't get either to do anything.

I also tried using Git GUI but when I select the folder I want it says that it's not a Git repository...does it need to be zipped up? I tried adding the .gitconfig file in the folder but it doesn't make a difference.

Thanks in advance :)


Source: (StackOverflow)

Streaming large file uploads to ASP.NET MVC

For an application I'm working on, I need to allow the user to upload very large files--i.e., potentially many gigabytes--via our website. Unfortunately, ASP.NET MVC appears to load the entire request into RAM before beginning to service it--not exactly ideal for such an application. Notably, trying to circumvent the issue via code such as the following:

if (request.Method == "POST")
{
    request.ContentLength = clientRequest.InputStream.Length;
    var rgbBody = new byte[32768];

    using (var requestStream = request.GetRequestStream())
    {
        int cbRead;
        while ((cbRead = clientRequest.InputStream.Read(rgbBody, 0, rgbBody.Length)) > 0)
        {
            fileStream.Write(rgbBody, 0, cbRead);
        }
    }
}

fails to circumvent the buffer-the-request-into-RAM mentality. Is there an easy way to work around this behavior?


Source: (StackOverflow)