File upload limitations

Hi,
Do you think it is possible to follow youtube API
recommandations for upload (
http://code.google.com/apis/youtube/developers_guide_protocol.html#Direct_uploading)
according to the fact that :
- fileReference will send with
Content-Type=multipart/form-data instead of multipart/related
- URLRequest object used with FileReference methods ignores
requestHeaders.
- It seems there is no alternative to FileReference to point
to a file
Any hint?
Regards,
Phil

Hi,
Please refer this link and make changes to web.config file in the root directory and check if it helps:
http://stackoverflow.com/questions/20502026/resource-has-been-removed-accessing-files-on-windows-azure-website
Also refer this link:
http://blogs.msdn.com/b/avkashchauhan/archive/2012/06/19/windows-azure-website-uploading-downloading-files-over-ftp-and-collecting-diagnostics-logs.aspx
Regards,
Azam Khan

Similar Messages

  • No of Columns limitation for file upload APEX 4.1

    Hi,
    I am using apex 4.1 file upload wizard to upload csv data.My csv file contains 58 columns that i have to insert into table.
    when i proceed with the wizard and inserted records into the table. only first 46 records has been inserted.
    Also, data\table mapping form also shows only 46 columns for column mapping.
    Is there any column limit to file upload?
    Can you help me on the same?

    Hi Frank,
    Yes you are right, the number of columns (through data upload feature) is limited to 46 columns.
    Regards,
    Patrick

  • Upload File size limitation in AIR ???

    Is there any upload file size limitation in air application ? Can any one post me the related articles on AIR application Multiple file upload ??
    Regards,
    Rahul.

    Hi Rahul, i dont understand completly your question, but i was have a similar situation some years ago.
    The limitation is not by AIR, all local servers(wampp, xampp, etc) are limited in the command UPLOAD_FILES.
    This have by default 3 or 5 mb by each file to can be uploaded, only you have to do is change the default value in php.ini file to this line
    "upload_max_filesize".
    I hope this will help you

  • Is there any way to off the limitation of file upload?

    Hi
    jdev 11.1.1.5
    Is ther any way to off the limitation of file upload size?
    I want to handle in in my code

    Duplicate of {thread:id=2541076}
    Timo

  • Limited bandwidth during file upload

    Hi All,
    Does it exist a possibility to limit used bandwidth during a file upload from a AIR app?
    For example , is it possible to fix this limit to 10 or 100 kbps?
    Thanks in advance
    Gianni

    Hi,
    any news about this discussion?
    Thanks
    Ennio

  • Calendar & File Upload Components - Threadinar6

    Hi All,
    This is the sixth in the "Threadinar" series , please see Threadinar5 at
    http://swforum.sun.com/jive/thread.jspa?threadID=99473 for details
    In this Threadinar we will focus on the
    "Calendar" and "File Upload" Components
    Let us begin our discussion with the Calendar Component.
    Calendar Component
    You can drag the Calendar component "calendar component icon" from the Palette's Basic category to a page open in the Visual Designer to create an entry field with an integrated calendar pop-up to help the user pick dates for the field.
    You can also drop the calendar on a container component, like a table cell or group box.
    After dragging the component to the Visual Designer, you can work with the following useful properties of the Calendar Component:-
    General
    * id. Type: String
    The name of the Calendar component in the page bean and the JSP file.
    Appearance
    * columns. Type: int
    The number of character columns used to render the component. The default value is 20.
    * dateFormatPattern. Type: String
    The format of the date to be entered by the user. It is not usually necessary to set this property because a pattern is chosen automatically based on the locale.
    If you prefer to specify a date format, click the ellipsis button (...) to the right of the property and select a predefined date format from the property editor's list. You can also add your own formats. If you add a format, the values you can enter are limited to some combination of yyyy for the year, MM for the month, and dd for the day separated by separator characters. Typical separator characters are / (slash), . (period), and - (dash). For example, the following date formats are acceptable:
    o MM/dd/yyyy
    o yyyy.MM.dd
    o MM-dd-yyyy
    * dateFormatPatternHelp. Type: text
    Text that appears below the date entry field and shows the format pattern that the date entry field accepts. If you have not set the dateFormatPattern property, the help text is chosen automatically for you. If you have set the dateFormatPattern property, you should bind the dateFormatPatternHelp property to a localized string that matches the setting for each locale you want to support.
    * label. Type: String
    A label that appears next to the text entry field, typically describing what the user is supposed to enter.
    o Note: The label property is not as flexible as the Label component. You can use the Label component if you want more control over the label's appearance, such as positioning of the label relative to the component.
    * labelLevel. Type: int
    A number that affects the appearance of the label. 1 (Strong) is larger and bold. 2 (Medium), the default, is smaller and bold. 3 (Weak) is smaller and normal (not bold). This property takes effect only if the label property is set.
    * style. Type: String
    Cascading Style Sheet rules (CSS level 2) to be applied to the component. For example:
    position: absolute; left: 288px; top: 312px
    You can enter values directly or click the ellipsis (...) button to use the Style Editor.
    o Note: This property overrides any settings in the theme or the project CSS file for this component. If a style specified in this property does not appear to take effect, it is because an area of the component is obscured by a child component that has different style settings.
    For a list of CSS2 style attributes, see the web page at
    http://www.w3.org/TR/REC-CSS2/propidx.html
    * styleClass. Type: String
    A space-separated list of CSS2 style classes to be applied when the component is rendered. The style classes must be defined in the project's style sheet or in the theme's CSS file. If you click the ellipsis button (...), you see a list of all styles you can add to this property. For information on adding CSS classes and rules to the project's cascading style sheet, see CSS Editor.
    o Note: See the note above under the style property description for an explanation of why a class added to this property might appear to have no effect on the component.
    o Note: If you add a CSS style class from the current theme to your project CSS file and you redefine the style class, the change affects all components that use this style class. However, you can add your own style classes to the project CSS file that redefine the default style classes, and then when you add them to this property, the changes affect only this instance of this component.
    For the defaulttheme.jar CSS style classes for this component, see Calendar Component CSS Classes.
    Data
    * maxDate. Type: java.util.Date
    The last date that the user can select. The default value is four years from the date set in the minDate property, for a total span of five years.
    * minDate. Type: java.util.Date
    The earliest date that the user can select. The default value is the value of the selectedDate property, which defaults to the current date if that property is not set.
    * required. Type: boolean
    If selected, the user must enter a value for the calendar before the page can be submitted. If you add a Message component to the page and link its for property to this component, an error message will be displayed if the user tries to submit the page without entering a value.
    * selectedDate. Type: Date
    A java.util.Date object representing the calendar date selected by the user. If you right-click the component and choose Bind to Data, you can bind this property to a data provider or object that can process the user entered value on the server.
    When the component displays initially, if this property is not set, its value defaults to the current date. If you provide values for minDate and maxDate, you can also provide a value for this property that initially displays a date in that range.
    * validator. Type: MethodBinding
    Indicates the JavaServer Faces validator that is called when the value is submitted. A validator ensures that the correct value is entered by a user. Choose a validator from the drop-down list. If you choose (null), no validator is called. If you choose a validator, also select the required property to ensure that the validator is used. For descriptions of JavaServer Faces validators, see the list of topics at List of Validators.
    o Note: If you define your own validate method, for example, by right-clicking the component and choosing Edit Event Handler > validate, any value you might have set in this property is overridden.
    File Upload Component
    You can drag the File Upload component "file upload component icon" from the Palette's Basic category to the Visual Designer to create an entry field and a browse button that opens a file chooser dialog on the local system, enabling the user either to select a file or to type a file name into the entry field. When the page is submitted, a copy of the file's contents is sent to the web application.
    The component is similar to an HTML <input type="file"> element.
    * Note: This component is neither supported by nor available in portlet projects due to security reasons.
    * Note: The size of the component in the Visual Designer might not match the size of the component when it is rendered in a web browser, making the component appear to line up correctly in the Visual Designer, but not when the page is rendered in the user's web browser. Also, the rendering of this component can differ depending on the web browser. Be sure to test the component in the web browsers that you expect your users to use. For example, if you add a width setting to the style property that is smaller than the setting in the columns property, Internet Explorer observes only the width setting, while the Mozilla browser ignores it and sets the width according to the number of characters in the columns property.
    The File upload component uses a filter, a com.sun.rave.web.ui.util.UploadFilter object that is configured for you in the web application's deployment descriptor. The UploadFilter uses the Apache commons fileupload package. You might need to change these settings in the following two cases:
    * The server holds the uploaded file in memory unless it exceeds 4096 bytes; otherwise, the server holds the file contents in a temporary file. You can change this threshold by modifying the sizeThreshold parameter for the UploadFilter filter entry in the web application's web.xml file.
    * By default, the File Upload component can handle files up to one megabyte in size. You can change the maximum file size by modifying the maxSize parameter for the UploadFilter filter entry in the application's web.xml file.
    o
    A negative value for the maxSize parameter indicates that there is no file size limit. Setting the parameter to a negative value is not recommended for security reasons. For example, if you allow unlimited file sizes, a malicious user could mount a denial of service attack on your site by using extremely large files
    * To change the settings for the UploadFilter object in the web.xml file:
    1. In the Files window, expand project-name > web > WEB-INF.
    2. Double-click the web.xml node to open the file in the XML editor.
    3. Click the Filters toolbar button.
    4. In the UploadFilter section under Initialization Parameters, you can change the values for the maxSize and sizeThreshold parameters.
    The contents of the uploaded file, together with some information about it, are stored in an instance of com.sun.rave.web.ui.model.UploadedFile. By using this object, you can get the content of the file as a String or write the contents to disk, as well as get properties such as the name and the size of the file. In the interest of conserving memory, the contents and file data are only available during the HTTP request in which the file was uploaded. To access the contents of the uploaded file, bind the uploadedFile property to a bean property of type com.sun.rave.web.ui.model.UploadedFile. Have the setter or an action method process the file.
    The UploadedFile interface has methods for getting the name and size of the file, determining the file's MIME type (such as text/plain or image/jpeg), getting the file's contents as bytes or as a String, and writing the contents to disk. To learn more, in the Java editor, right-click on UploadedFile in a declaration statement and choose Show JavaDoc from the pop-up menu.
    * To set the component's properties, select the component and edit its properties in the File Upload Properties Window.
    * Right-click the component and choose one of the following pop-up menu items:
    o Edit validate Event Handler. Opens the Java Editor with the cursor positioned in the component's validate method so you can insert code to validate the value of the component.
    o Set Initial Focus. Gives this component focus when the user opens the page.
    o Auto-submit on Change. Causes the form to be automatically submitted if the value of the component changes. Sets the component's JavaScript onclick property to common_timeoutSubmitForm(this.form, 'component-id');. At runtime, this code causes the form to be automatically submitted if the user changes the component value. Once the form is submitted, conversion and validation occur on the server and any value change listener methods execute, and then the page is redisplayed.
    A component configured to Auto-submit on Change can use virtual forms to limit the input fields that are processed when the form is submitted. If the auto-submit component is defined to submit a virtual form, only the participants in that virtual form will be processed when the auto-submit occurs.
    o Bind to Data. Bind the component's text property to an object or to a data provider. For more information, see Bind to Data Dialog Box.
    o Property Bindings. Bind any of the component's properties to an object or data provider, such as the uploadedFile property to a bean property of type com.sun.rave.web.ui.model.UploadedFile.
    o Configure Virtual Forms. Enables you to add the component to a virtual form.
    For more details on using the "File Upload Component" Please see this tutorial
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/file_upload.html
    Please share your comments, experiences, additional information, questions, feedback, etc. on these components.
    ------------------------------------------------------------------------------- --------------------

    Of interest relating to file upload component to users : "Saving Uploaded Files Uploaded by the File Upload Component " Check the blog:
    http://blogs.sun.com/roller/page/divas

  • HELP! File Upload Servlet and Internet Explorer

    Hello people. I hope this is an easy problem to solve...
    I have a servlet upload program that works using Mozilla browser (www.mozilla.org), but for some reason it doesn't work using Microsoft IE. The servlet is also using the servlet upload API from Apache (commons).
    I'm using IE version 6.0.2800.1106 in a Win98SE host computer. I get a cannot find path specified error message (see below). At work, I also get the same error message using IE, but don't know what version. The OS is XP. Unfortunately, at work, I can't install Mozilla browser (or any software-company policy) to see if Mozilla works there too. I would've like to have tested to see if the upload program worked on Mozilla on a truly remote computer.
    So I figured, it must be a IE configuration issue, but darn it!! I began by resetting IE to default settings, but still have the problem, I played around with several different combinations of settings in "Tools"-->"Internet Options...", and I still get the error message. Someone PLEASE HELP ME!!!
    Dunno, if it will help, I've also pasted the upload servlet source code below and the html file that's calling the upload servlet, but you still need the Apache commons file upload API.
    Trust me on this one folks, for some reason it works for Mozilla, but not for IE. With IE, I can at least access web server, and therefore, the html file that calls the upload servlet , so I don't think it's a Tomcat configuration issue (version 5.0). I actually got the code for the file upload servlet from a book relatively new in the market (printed in 2003), and it didn't mention any limitations as far as what browser to use or any browser configuration requirements. I have e-mailed the authors, but they probably get a ton of e-mails...
    Anyone suggestions?
    Meanwhile, I will try to install other free browsers and see if the file upload program works for them too.
    ERROR MESSAGE:
    "HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: C:\TOMCAT\webapps\MyWebApps\files\C:\WINDOWS\Desktop\myfile.zip (The system cannot find the path specified)
         com.jspbook.FileUploadCommons.doPost(FileUploadCommons.java:43)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    root cause
    java.io.FileNotFoundException: C:\TOMCAT\webapps\MyWebApp\files\C:\WINDOWS\Desktop\myfile.zip (The system cannot find the path specified)
         java.io.FileOutputStream.open(Native Method)
         java.io.FileOutputStream.(FileOutputStream.java:176)
         java.io.FileOutputStream.(FileOutputStream.java:131)
         org.apache.commons.fileupload.DefaultFileItem.write(DefaultFileItem.java:392)
         com.jspbook.FileUploadCommons.doPost(FileUploadCommons.java:36)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    note The full stack trace of the root cause is available in the Tomcat logs.
    Apache Tomcat 5.0.16"
    FILE UPLOAD SERVLET source code:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import org.apache.commons.fileupload.*;
    import java.util.*;
    public class FileUploadCommons extends HttpServlet {
    public void doPost(HttpServletRequest request,
    HttpServletResponse response)
    throws IOException, ServletException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("<html>");
    out.print("File upload success. <a href=\"/MyWebApp/files/");
    out.print("\">Click here to browse through all uploaded ");
    out.println("files.</a><br>");
    ServletContext sc = getServletContext();
    String path = sc.getRealPath("/files");
    org.apache.commons.fileupload.DiskFileUpload fu = new
    org.apache.commons.fileupload.DiskFileUpload();
    fu.setSizeMax(-1);
    fu.setRepositoryPath(path);
    try {
    List l = fu.parseRequest(request);
    Iterator i = l.iterator();
    while (i.hasNext()) {
    FileItem fi = (FileItem)i.next();
    fi.write(new File(path, fi.getName()));
    catch (Exception e) {
    throw new ServletException(e);
    out.println("</html>");
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws IOException, ServletException {
    doPost(request, response);
    HTML PAGE that calls the upload servlet:
    <html>
    <head>
    <title>Example HTML Form</title>
    </head>
    <body>
    <p>Select a file to upload or browse
    currently uploaded files.</p>
    <form action="http://##.##.##.####/MyWebApp/FileUploadCommons"
    method="post" enctype="multipart/form-data">
    File: <input type="file" name="file"><br>
    <input value="Upload File" type="submit">
    </form>
    </body>
    </html>
    Thanks in advance for any assistance.
    -Dan

    I'm guessing what is happening is that Mozilla tells the servlet "here comes the file myfile.zip". The servlet builds a file name for it:
        String path = sc.getRealPath("/files");
        // path is now C:\TOMCAT\webapps\MyWebApps\files\
        fi.write(new File(path, fi.getName()));
        // append myfile.zip to "path", making it C:\TOMCAT\webapps\MyWebApps\files\myfile.zipIE, however, tells "here comes the file C:\WINDOWS\Desktop\myfile.zip". Now imagine what the path+filename ends up being...
    So what you want to do is something along the lines of (assuming Windoze):
    public static String basename(String filename)
        int slash = filename.lastIndexOf("\\");
        if (slash != -1)
            filename = filename.substring(slash + 1);
        // I think Windows doesn't like /'s either
        int slash = filename.lastIndexOf("/");
        if (slash != -1)
            filename = filename.substring(slash + 1);
        // In case the name is C:foo.txt
        int slash = filename.lastIndexOf(":");
        if (slash != -1)
            filename = filename.substring(slash + 1);
        return filename;
        fi.write(new File(path, basename(fi.getName()));
        ....You can make the file name check more bomb proof if security is an issue. Long file names trying to overflow something in the OS, NUL characters, Unicode, forbidden names in Windos (con, nul, ...), missing file name, ...

  • File upload through BlazeDS remote object?

    Hi,
    After researching file upload options in flex, it seems like the only option is through HTTP service requests, such as:
    private var fileRef:FileReference;
    fileRef.upload(new URLRequest(FILE_UPLOAD_URL));
    Is there any way to use BlazeDS remote objects to upload a file from Flex interface? Perhaps passing in a FileReference object and marshalling it into an equivalent Java object?
    Thanks!

    I know there is a workaround like this. It uses a servlet to upload a file and returns a url. The uploaded file is either stored in session or server file system until the session expires. Use the PropertyProxy to register a custom class which contains this url and convert to java.io.File. It is the limitation of the player. It cannot read the local file system for security reason. There is a sample in blazeds/trunk/qa/apps/qa-regress/WEB-INF/src/blazeds/qa/remotingService/Echo.java
    static
    PropertyProxyRegistry registry = PropertyProxyRegistry.getRegistry();
    PropertyProxy proxy = registry.getProxy(java.io.File.class);
    if (proxy == null)
    registry.register(java.io.File.class, new FileProxy());
    proxy = registry.getProxy(FileReference.class);
    if (proxy == null)
    registry.register(FileReference.class, new FileReferenceProxy());
    Hope it can help

  • File upload gives invalid file name if file name exceeds 255 characters

    We are using SharePoint 2010. I have arround 4-5 GB data that I have to upload to document library. That data includes documents (docx, xlsx, pdf etc) with very deep folder structure and long names that can not be changed. When I trying to upload that folder
    through Windows explorer or Multiple File Upload or SharePoint workspace but it is not uploading the files with long names.
    I know there is a limitation of 255 Characters but is there any workarround to upload that bunch of data!
    Thanks,

    Hi there,
    Microsoft has published a hotfix for fixing length  of the file limitation
    http://support.microsoft.com/kb/956056/
    Thank you,
    Mukesh Ajmera|
    LinkedIn | http://mukeshajmera.wordpress.com/|
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

  • PDF forms and file uploads

    I realize that FormsCentral does not currently support file uploads (aka attachments) when using a PDF form to submit. In several of this places I've read this, it seems to imply that PDF forms to not support file uploads. I also noticed that when a PDF form is enabled for use with FormsCentral, the submit format is "HTML" (i.e., URL-encoded, or multipart/form-data when file attachments are present). PDF forms do indeed support file uploads in the same way that HTML forms do, so I'm wondering why FormsCentral doesn't allow them with PDF forms. On the form side, all it takes is setting up a text field so it can be used for file selection (Field Properties > Options > [Scroll Long Text] && [Field is used for file selection]) along with the field.browseForFileToSubmit JavaScript method (http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.734.html) with a button. The data is sent in the same format as with an HTML form, so it isn't difficult to process. What's the reason for this limitation, or will this method in fact work? I know that PDF forms can also support attachments two other ways, either as actual file attachments to the PDF or as a files attached as a comments, but these types are not what I'm asking about.

    Randy,
    Thank you for the reply. I am a bit surprised though, as I recall about 10 years ago modifying a CGI program designed to process HTML form submissions that could included file uploads. I didn't have to change any of the code that parsed the input when it was used with a PDF form that submitted as "HTML", since the format of the POSTed data is the same. I did have to modify the code that generated the response (to return an FDF), but that's a different matter. I think it would be great to support file uploads with PDF forms, as well as submitting as FDF.

  • File upload and Download

    I m storing the attatchments in java table as binary data.Is there any restriction on the size of the attachmnents? Also while Downloading the file the name of the file is not visible.
    Please help me on this issue.

    BHAVANA,
    There is ceratin size limits on file upload imposed by some browsers (AFAIK, 1.5-2 Mb).
    There is some gotchas will FileDownlad / FileUpload in NW04 -- complete file content must be in memory. So server memory size is other limit.
    Regarding name. Please post code where are you manipulating IWDBinaryType / IWDResource. Probably error is there.
    VS

  • File Upload in Web Dynpro

    Hi all,
    I need to upload file from user local computer into Web Dynpro context, but standard FileUpload component doesn't look very "attractive" to me. There are 3 main reasons:
    1. when user don't use Browse functionality, but he/she types directly for example == "xxxx" (not valid absolute windows path) into input field of FU Component and then click Upload, application freeze - and loading that 'file' forever.....
    2. don't know how to specify custom file types in showed FileChooser  (predefined are AllFiles, Pictures, HTML)
    3. Browse label is not internationalized, no possibility to change that text (and that button also looks "different" )
    How can I eliminate these minuses, or is here alternative solution for file uploading file in WD? My customer environment is NW 2004.
    Regards,
    Juraj

    Dynpro UI elements has limitations. But we can use them the way we want within these limitations.
    1. when user don't use Browse functionality, but he/she types directly for example == "xxxx" (not valid absolute windows path) into input field of FU Component and then click Upload, application freeze - and loading that 'file' forever.....
    If there is a fixed place to hold the documents, we can prefix the path upto the filename.
    2. don't know how to specify custom file types in showed FileChooser (predefined are AllFiles, Pictures, HTML)
    we can get the MIME type from the resource. And further processing can be restricted.
    3. Browse label is not internationalized, no possibility to change that text (and that button also looks "different" )
    I Agree that we can't change "Browse", but still we can have the orientation, if your browser is Arabic, it got aligned at right hand side.
    thread:
    nikhil
    Edited by: Nikhil ßos on Jul 3, 2008 1:07 PM

  • File upload sendmail not displaying user input

    Hello ive set up the upload example from     http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Images_01.html
    i added a textarea field and a sendmail function.  all is working well but the email does not contain any of the data from the fields on the form that the user submits. its just white space where that data should be.....Could someone please check this code and see what i am doing wrong ...thanks, kevin
    ---------------------------Here is the form page:---------------------------------
    <cfparam name="FORM.image" default="" />
    <cfparam name="FORM.comments" default="" />
    <!--- Create an empty error string --->
    <cfset strError = "">
    <!--- This code creates a form with one field where the user enters the image file to upload. --->
    <cfform action="makeThumbnail.cfm" method="post" enctype="multipart/form-data">
    <p>Please upload an image:
      <cfinput type="file" name="image" required="yes" id="image" value="#Trim(FORM.image)#" message="Please enter an image!">
    </p>
    <p>
      <cftextarea name="Comments" cols="20" rows="4" required="yes" id="Comments" message="Please enter your Comments!" enabled="no" value="#Trim(FORM.comments)#" maxlenght="160" visable="no" />  </p>
    <p>
      <cfinput type="submit" value="Send Image" name="Submit">
    </p>
    <cfif IsDefined( "FORM.image" )>
    <cfif IsDefined( "FORM.comments" )>
    <cfmail
    from="[email protected]"
    to="[email protected]"
    subject="Visitor Email."
    server="outgoing server"
    username="usernam"
    password="pass">
                    File uploaded.
       <cfoutput> image: #Trim(FORM.image)#, comments: #Trim(FORM.comments)#, #Now()#</cfoutput>
    </cfmail>
        </cfif>
      </cfif>
    </cfform>
    -----------this is the makethumbnail.cfm which i made no changes ---------------------
    <cfset thisDir = expandPath(".")>
    <!--- Determine whether the form is uploaded with the image. --->
    <cfif structKeyExists(form,"image") and len(trim(form.image))>
        <!--- Use the cffile tag to upload the image file. --->
        <cffile action="upload" fileField="image" destination="#thisDir#" result="fileUpload"
            nameconflict="overwrite">
        <!--- Determine whether the image file is saved. --->
        <cfif fileUpload.fileWasSaved>
        <!--- Determine whether the saved file is a valid image file. --->
            <cfif IsImageFile("#fileUpload.serverfile#")>
        <!--- Read the image file into a variable called myImage. --->
                <cfimage action="read" source="#fileUpload.serverfile#" name="myImage">
                <!--- Determine whether the image file exceeds the size limits. --->
                <cfif ImageGetHeight(myImage) gt 480 or ImageGetWidth(myImage) gt 360>
                    <!--- If the file is too large, delete it from the server. --->
                    <cffile action="delete"
                        file="#fileUpload.serverDirectory#/#fileUpload.serverFile#">
                    <cfoutput>
                    <p>
                    The image you uploaded was too large. It must be less than 480 pixels wide
                        and 360 pixels high. Your image was #imageGetWidth(myImage)# pixels wide
                        and #imageGetHeight(myImage)# pixels high.
                    </p>
                    </cfoutput>
                    <!--- If the image is valid and does not exceed the size limits,
                        create a thumbnail image from the source file that is 75-pixels
                        square, while maintaining the aspect ratio of the source image.
                        Use the bilinear interpolation method to improve performance.
                        --->
                <cfelse>
        <cfset ImageScaleToFit(myImage,100,100,"bilinear")>
                    <!--- Specify the new filename as the source filename with
                        "_thumbnail" appended to it. --->
                    <cfset newImageName = fileUpload.serverDirectory & "/" &
                        fileUpload.serverFilename & "_thumbnail." &
                        fileUpload.serverFileExt>
                    <!--- Save the thumbnail image to a file with the new filename. --->
                    <cfimage source="#myImage#" action="write"
                        destination="#newImageName#" overwrite="yes">
                    <cfoutput>
                    <p>
                    Thank you for uploading the image. We have created a thumbnail for
                        your picture.
                    </p>
                    <p>
                    <!--- Display the thumbnail image. --->
                    <img src="#getFileFromPath(newImageName)#">
                    </p>
                    </cfoutput>   
                </cfif>
            <!--- If it is not a valid image file, delete it from the server. --->
            <cfelse>
                <cffile action="delete"
                    file="#fileUpload.serverDirectory#/#fileUpload.serverFile#">
                <cfoutput>
                <p>
                The file you uploaded, #fileUpload.clientFile#, was not a valid image.
                </p>
                </cfoutput>
            </cfif>
        </cfif>
    </cfif>

    Hello ive set up the upload example from     http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Images_01.html
    i added a textarea field and a sendmail function.  all is working well but the email does not contain any of the data from the fields on the form that the user submits. its just white space where that data should be.....Could someone please check this code and see what i am doing wrong ...thanks, kevin
    ---------------------------Here is the form page:---------------------------------
    <cfparam name="FORM.image" default="" />
    <cfparam name="FORM.comments" default="" />
    <!--- Create an empty error string --->
    <cfset strError = "">
    <!--- This code creates a form with one field where the user enters the image file to upload. --->
    <cfform action="makeThumbnail.cfm" method="post" enctype="multipart/form-data">
    <p>Please upload an image:
      <cfinput type="file" name="image" required="yes" id="image" value="#Trim(FORM.image)#" message="Please enter an image!">
    </p>
    <p>
      <cftextarea name="Comments" cols="20" rows="4" required="yes" id="Comments" message="Please enter your Comments!" enabled="no" value="#Trim(FORM.comments)#" maxlenght="160" visable="no" />  </p>
    <p>
      <cfinput type="submit" value="Send Image" name="Submit">
    </p>
    <cfif IsDefined( "FORM.image" )>
    <cfif IsDefined( "FORM.comments" )>
    <cfmail
    from="[email protected]"
    to="[email protected]"
    subject="Visitor Email."
    server="outgoing server"
    username="usernam"
    password="pass">
                    File uploaded.
       <cfoutput> image: #Trim(FORM.image)#, comments: #Trim(FORM.comments)#, #Now()#</cfoutput>
    </cfmail>
        </cfif>
      </cfif>
    </cfform>
    -----------this is the makethumbnail.cfm which i made no changes ---------------------
    <cfset thisDir = expandPath(".")>
    <!--- Determine whether the form is uploaded with the image. --->
    <cfif structKeyExists(form,"image") and len(trim(form.image))>
        <!--- Use the cffile tag to upload the image file. --->
        <cffile action="upload" fileField="image" destination="#thisDir#" result="fileUpload"
            nameconflict="overwrite">
        <!--- Determine whether the image file is saved. --->
        <cfif fileUpload.fileWasSaved>
        <!--- Determine whether the saved file is a valid image file. --->
            <cfif IsImageFile("#fileUpload.serverfile#")>
        <!--- Read the image file into a variable called myImage. --->
                <cfimage action="read" source="#fileUpload.serverfile#" name="myImage">
                <!--- Determine whether the image file exceeds the size limits. --->
                <cfif ImageGetHeight(myImage) gt 480 or ImageGetWidth(myImage) gt 360>
                    <!--- If the file is too large, delete it from the server. --->
                    <cffile action="delete"
                        file="#fileUpload.serverDirectory#/#fileUpload.serverFile#">
                    <cfoutput>
                    <p>
                    The image you uploaded was too large. It must be less than 480 pixels wide
                        and 360 pixels high. Your image was #imageGetWidth(myImage)# pixels wide
                        and #imageGetHeight(myImage)# pixels high.
                    </p>
                    </cfoutput>
                    <!--- If the image is valid and does not exceed the size limits,
                        create a thumbnail image from the source file that is 75-pixels
                        square, while maintaining the aspect ratio of the source image.
                        Use the bilinear interpolation method to improve performance.
                        --->
                <cfelse>
        <cfset ImageScaleToFit(myImage,100,100,"bilinear")>
                    <!--- Specify the new filename as the source filename with
                        "_thumbnail" appended to it. --->
                    <cfset newImageName = fileUpload.serverDirectory & "/" &
                        fileUpload.serverFilename & "_thumbnail." &
                        fileUpload.serverFileExt>
                    <!--- Save the thumbnail image to a file with the new filename. --->
                    <cfimage source="#myImage#" action="write"
                        destination="#newImageName#" overwrite="yes">
                    <cfoutput>
                    <p>
                    Thank you for uploading the image. We have created a thumbnail for
                        your picture.
                    </p>
                    <p>
                    <!--- Display the thumbnail image. --->
                    <img src="#getFileFromPath(newImageName)#">
                    </p>
                    </cfoutput>   
                </cfif>
            <!--- If it is not a valid image file, delete it from the server. --->
            <cfelse>
                <cffile action="delete"
                    file="#fileUpload.serverDirectory#/#fileUpload.serverFile#">
                <cfoutput>
                <p>
                The file you uploaded, #fileUpload.clientFile#, was not a valid image.
                </p>
                </cfoutput>
            </cfif>
        </cfif>
    </cfif>

  • Multipart form (file upload) processing in providers

    Hello,
    Just want to find out if anyone has successfully implemented a file upload mechanism within a Portal channel.
    According to the Provider API (http://docs.sun.com/source/816-6428-10/com/sun/portal/providers/Provider.html), the wrapped request/response objects do not support several methods that are essential to process file uploads, namely "getContentLength" and "getInputStream". I am currently trying to use the Apache commons-fileupload utility which uses those methods to process file uploads. This is also the case for another popular file upload utility from servlets.com.
    Does anyone have any info/explanation regarding this limitation in Portal Server 6, and any workarounds to this issue. One workaround is to have a window popup that interacts directly with an external webapp.
    Any ideas/suggestions will be appreciated, thanks in advance.
    jeff

    Hi Jeff,
    The Sun ONE Portal Server DesktopServlet does not have the ability to process a request with the content encoding type of multipart/form-data. DesktopServlet does not pass the input stream for the request on to the Provider.
    To accomplish handling of multipart/form-data type requests, it is necessary to create a companion servlet or JSP that process the multipart/form-data. This servlet can then pass control back to the Portal channel. The data from the file can be shared between the servlet and the provider by using static Java members or by storing the data in a back-end database and then passing a reference to the data over to the provider.
    Sanjeev

  • Socket, ftp, file upload

    Hi,
    I'm writting a library to manage ftp socket connections in AIR app. I'd like to implement a file upload operation but I need to answer some questions first.
    1. How big should be single package of data I send to server?
    2. How often packages can be sent?
    Running through the web I found examples where people sent packages at 4kb/300ms, 10kb/120ms.
    SmartFTP client sends 128kb/??. I wrote "??" because it seems that frequency of sending packages differs in a time.
    WinSCP client allows to set a limitation on upload transfer (8 - 1024 kb/s) but it also has a "unlimited" option. How does it know what is the maximum transfer at a moment?
    When I flushed 4kb each 1ms FTP server managed to receive only a part of my packages. Then I changed 1ms to 10ms and FTP server still didn't receive all packages but it received more than in previous case. Finally I set 100ms rate and the file was transfered properly. This test makes me to belive that package size and flush frequency really matters. I'm pretty sure that event if I send packages at 100ms rate it could cause some problems in cases when internet connection is low. I hoped that server may return some response when it receives package so I could know than next package can be send but nothing like that happens.
    I also tried to flush a whole file at once because I belived that is the way to get maximum file transfer and it worked but I'm affraid it's not a good solution. I'm affraid that it may cause some problems on a server-side because of too much data at once. It's just a hunch so let me know if I'm wrong, please.
    3. How do I know if file was sent properly?
    The only thing that comed to my mind was sending SIZE command after closing passive connection and comparing local file size with remote file size. But if sizes don't match then what? Delete remote file and send it againg? It seems weird. For all my life I didn't see a situtation in which ftp client didn't manage to send a file and even if that it tried to resend it.
    4. How can I estimate upload transfer?
    I can't rely on the amount of data I send because I can send 1kb/s as well as whole file at once and it won't reflec the real transfer. I need to know somehow how much of the data I send was received be server. Again SIZE command comed to my mind. I thought that while uploading I could send SIZE command at some time interval like 1000ms and estimate by that how many bytes is received by server each second. Unfortunately server doesn't respond to SIZE command until file transfer is complete.
    I'm lack of ideas: server doesn't return any confirmation that package was received and I can't do it by checking remote file size. What else can I do?
    If you can't help me I'll be glad if you poit me out a place where I could introduce my problem. It's difficult to find a forum about wrtting ftp client issues

    Thanks Kennethkawamoto2, now i knew the reason, but still i am getting error for crossdomain.xml , when moving flash on production.
    I am putting it as below,
    Security.loadPolicyFile('xmlsocket://ipaddress:80/crossdomain.xml');
    can anybody help?
    much appreciated,
    Meghana

Maybe you are looking for

  • Is there a way to delete all photos from phone at once, or does it have to be done individually?

    How can I delele all photos from my iphone?  Can I delete all at once, or do I have to go through and delete each one-at-a time?  I'm trying to free space for more photos, and they are already in the cloud and on my computer.  Thanks

  • How to get Test Utility for PI 7.3 Single Stack JAVA only.

    Hi All,    We are having PI 7.31. Single Stack JAVA only. we want to test some scenario. Can anybody tell me how can i test the scenario in PI 7.3 is there any test utility by which i can send some test messages to PI 7.3. from where to download this

  • Basic questions about macbook pro + external monitor

    Hi, I have some very basic questions about using a Macbook Pro + external display. I don't actually have them but need to know how things works. So, here they are: 1) Can I use the external display as the main display? 2) Will the external display ru

  • IPhone 4S major battery drain after updating to iOS 7!!

    This is such a joke, and I'm so mad about this, my iPhone 4S which is less than a year old use to pull 7-8 hours usage and 12-15hours standby time, now thanks to ios 7 my iphone 4s is currently  at 24% with only 2 hours usage and 4 hours and 45minute

  • A question.. but little different...

    I want to know.. that... i wana know that is that possible .... actually i want to implment a software.... a software whcih can access other programm features... for example... via my software.. 1)i can open Calculator(calc.exe) 2)if i add 1 + 1 the