Using CFFILE To Upload a Full Directory

I am attempting to build a process to load multiple files
from a directory. It is easy enough to use looping processes with
multiple <input type="file".... tags (or even a single tag
looped over multiple times) in both the form and the action page.
However, I want to use a single action to load all files in a
specified directory on the client desktop to the server. Is there a
standard process or does anyone know a CFC or CFX tag? Note, this
will be used with both MX7 and CF 5 servers.
Thanks,

klltkd wrote:
> I am attempting to build a process to load multiple
files from a directory. It
> is easy enough to use looping processes with multiple
<input type="file"....
> tags (or even a single tag looped over multiple times)
in both the form and the
> action page.
>
> However, I want to use a single action to load all files
in a specified
> directory on the client desktop to the server. Is there
a standard process or
> does anyone know a CFC or CFX tag? Note, this will be
used with both MX7 and CF
> 5 servers.
>
> Thanks,
>
Unless you are working within a well defined network where
ColdFusion
can access the client machine by UNC path, then ColdFusion is
not
involved in this. You are looking for a client solution that
will
create the upload. After that it looks the same to
ColdFusion.
I am not personally aware of any client tools like you
describe. There
are security concerns when one makes it too convienant to
programatically select what is uploaded to a remote computer.

Similar Messages

  • Uploading documents using CFFile

    I am using CFFile for uploading documents using Cold Fusion 8
    in my Intranet environment. Each record has a limit of 20 documents
    that can be uploaded into MySQL database. It seems if I upload
    mulitple documents at around 1mb it takes less than a minute to
    complete. The problem seems to be when I upload muliptle documents
    that are bigger.
    If I attempt to upload 2 documents each over 25mb it takes
    around 10 minutes.
    Anyone have suggestions on alternatitve way to do this or
    should I just limit size of each upload to 4mb and less?

    Isn't this just a product of your internet speed and the size
    of the upload?

  • CFfile multiple upload problem

    Hello~
    I am using two cfinput tags with a type of "file" within the same form. They accept different file types, using regex validation to check each, and have different name and id values.
    <!--- FORM FIELDS ---><cfinput type="file" name="pageLayoutCSSFileUpload" class="inputArea" message="Please upload a .css file." required="yes" size="50" id="pageLayoutCSSFileUpload" validate="regex" pattern="^.*\.(css|CSS)$" /><cfinput type="file" name="pageLayoutImageUpload" class="inputArea" message="Please upload a layout image (.gif)." required="yes" size="50" id="pageLayoutImageUpload" validate="regex" pattern="^.*\.(gif|GIF)$" />
    Once the form is submitted, I am using cffile to upload each to the same directory, with the same name, but different extensions (one .css and one .gif). The first file, .css, uploads correctly. Then I get an error with the second cffile tag that the mime-type is incorrect, and that the file must be in the image/gif format. I know that the test files I am using are in the correct format, so it seems like the second cffile tag is looking at the first file that is being uploaded. I don't know how this can happen, as the "file" value for each cffile tag is being set through a form variable, which relates directly to the two seperate input fields.
    <!--- FORM ACTION ---><!--- upload page layout CSS file --->
    <cffile action="upload" destination="#local.pageLayoutsPath#pageLayout_#numberFormat(local.layoutID,000)#" file="#form.pageLayoutCSSFileUpload#" nameconflict="error" result="local.pageLayoutCSSFileUpload" accept="text/css" />
    <!--- upload page layout image file (large) --->
    <cffile action="upload" destination="#local.pageLayoutsPath#pageLayout_#numberFormat(local.layoutID,000)#" file="#form.pageLayoutImageUpload#" nameconflict="error" result="local.pageLayoutImageUpload" accept="image/gif" />
    Has anyone else had this problem? It is complicated to explain, so let me know if this doesn't make sense... Thanks!

    According to the docs (and my past experience):
    http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-73 8f.html
    <cffile action="upload"> requires a FILEFIELD attribute, which should be the name of the form field relevant to the file in question.  Note: not the VALUE of the form field, but the NAME of it.
    I'm surprised your code isn't erroring, given FILEFIELD is - appaerently - required.
    Adam

  • Upload Entire Directory Using CFFILE

    I need to write an application that will allow the user to
    select all the contents of a directory on their local hard drive
    (or just point to the directory) and upload all the files in that
    directory to a location on a the web server. The user should not
    have to point to a file, just select all the contents at once.
    Does anyone know how to to so this using CFFILE? We are using
    ColdFusion 8.
    Thanks in Advance!!

    > If not, there must be a away--ColdFusion is such a great
    program, and I have
    > gotten it to do just about anything we need it to do
    except upload multiple
    > files files at once to our server...
    The files you are uploading are on the client computer.
    ColdFusion has
    *no* interaction with the client computer at all. All
    communications are
    between client and WEB SERVER. File uploads are handled by
    the client
    computer, using the provisions of the HTTP protocol, which -
    as implemented
    by a web browser - only allows for single files to be
    uploaded, via each
    file input control on a form.
    If you want multiple files to be uploaded from a client
    computer using a
    single control, you need to use something other than a web
    browser (as
    suggested by someone else: some manner of applet, perhaps
    embedded in an
    HTML document).
    The applet will pass the data to the web server, and if the
    request is for
    a mime type that the web server has been configured to pass
    to ColdFusion
    (usually a CFM or a CFC file), then the web server will pass
    the request to
    ColdFusion, which will deal with it however you tell it to.
    The problem isn't getting the files to CF; it's getting them
    to the web
    server in the first place. CF's got nothing to do with your
    problem (or,
    intrinsically, its solution).
    Adam

  • Creating a directory before using cffile

    I'm having trouble using cffile right before I create a directory. I am using the cffileupload tag and my url attribute is a page that has the following code. Basically the code below creates a new directory and uploads all the images to that directory. However, it fails on the 2nd upload and i get a 500 error in the cffileupload flash object. However, if I hardcode the directory path, they all upload fine. Anyone know why I am having this problem?
    <!--- User will upload all the images to a temp directory based on date and time --->
    <cfset uploadFolderPath = "C:\ColdFusion9\wwwroot\MyApplication\uploads\" />
    <cfset date=DateFormat(Now(),'mm-dd-yyyy_') />
    <cfset time=TimeFormat(Now(),'hh-mm-ss') />
    <cfset newFolderName = "upload_" & date & time />
    <cfset newFolder = uploadFolderPath & newFolderName />
    <cfdirectory action = "create" directory="#newFolder#" />
    <cffile action="uploadall" destination="#newFolder#" nameconflict="makeunique" />

    It seems unlikely to be your problem, but be aware that <cffileupload> calls that URL once for each file uploaded, not just once.  That means the <cfdirectory> could conceivably be called twice within the same second, meaning the second call to it might fail because the dir already exists.
    You should probably check the dir exists before just assuming you're OK to create it.
    Adam

  • Uploading a full site to BC.

    Hello,
    I have a site I created at school using HTML and CSS coding.  My next class has us using Dreamweaver which I'm already familiar with, but I want to upload the site I coded from scratch so I can show it off.  I was going to use one of my Business Catalyst sites, but every time I put it to the server, BC creates style sheets for me and templates that I do not want to use. 
    Is there any way to upload a full site to BC without using Adobe's style sheets or templates?  I mean, I thought that was the whole point of becoming a developer.
    Should I just buy space through another provider so I can upload a site using my style sheets and templates?
    Any suggestions are welcomed.
    Thanks!

    Hi Ian,
    Custom templates are fine to use as long as its all client-side scripted files (HTML, CSS, Flash etc). 
    Templates designed for like Dupral, Joomla, etc will not fully work especially because our modules/components are not compatible with BC.  So with this understanding when purchasing a custom template you can then simply upload via FTP and add to the site template section to easily manage and assign. 
    Kind regards,
    -Sidney

  • I use FireFTP to upload files. This past week the profilesuddenly stopped connecting. Ideas?

    I manage two Websites and use FireFTP to upload files for both of them due to FireFTP's ease of use. I've never had a problem connecting before last week. The files on the host (my computer) show, but there is no response when I click on the "Connect" button. These were already established profiles and have worked before, and I have made no changes. I've tried to make the connection fairly frequently over the past week (this has been going on for a full week now), and tried a few minutes ago to confirm there was still a problem. There is. Did I have only a limited time to use FireFTP? If so, I don't recall being advised of that when I downloaded and installed it. I'd gladly pay a nominal fee just to not have to learn another FTP app, although there are many free FTP apps available on the Internet. Further, Firefox itself is not working -- I can not see any Webpages using Firefox, although in using IE or Chrome, the Webpages I seek come up. In fact, I had to find your Website and fill out this support ticket via IE. What is going on with Firefox and FireFTP? Thx.

    If Firefox won't connect, as well as FireFTP not connecting, the most common reason would be a firewall block after the update. That and other reasons are discussed in the following support articles:
    * [[Fix problems connecting to websites after updating Firefox]]
    * [[Firefox can't load websites but other browsers can]]
    Anything there help?

  • Create an entire web page using cffile

    I would like to create an entire web page using cffile..
    it seems that the output attribute is where you put the
    content like:
    output="this is a test."
    Q: so how do you add the full .htm content inside ....
    output=""
    ... where there will be lots of other double quotes?
    (if it involves 'escaping' characters - then I'll need some
    help with that.)
    Also : is it possible that the content could be some data
    combined with an cfinclude - i get errors when i try this...

    Well, I dont think I fully understand your intentions or
    goals are. However, from what I gather so far, you could output the
    data into pdf files. But like I said I dont understand what your
    trying to achieve. As far as the errors with <..etc, if they are
    included and you are trying to produce results those characters
    very well could cause problems when you are trying to do something
    that they were not intended to do.

  • Mail keeps attaching full directory instead of opening it

    Hi
    I am using Lion, but it was present under previous systems. At some time, when I want to attach a file to a message, and when browsing through directories, Mail attaches a full directory instead of opening it to complete the search.
    The problem seems to be quite random, and I suspect that rebooting is more or less the only way to put things back to normal.
    The problem with a random problem is that it is extremely difficult to track...
    I suspect this is a very deep system problem, maybe linked to click / double click procedure, because I have been having it since a very long time now, maybe since Leopard, I don't remember because it happens rarely, once in a while (maybe twice a year) ; you do notice it when it happens, but you don't remember what were the conditions (system, third party software, etc) when it happens.
    I have taken the habit to browse through my directories using 'column' view, so I never double click to open directories and I can finally get to the file I seek and then I double-click on it to attach it to the message.
    JLM

    Our httpd.conf file has DefaultType text/plain
    The web page in question has a header of:
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
    <META NAME="GENERATOR" CONTENT="Mozilla/4.04 [en] (X11; I; HP-UX B.10.20 9000/879) [Netscape]">
    And yet Firefox still wants to download the page instead of render it directly in the browser :-(

  • How to upload picture by directory????

    I only know picture will be load when I use
    ImageIcon c = new ImageIcon("xxx.jpg"); <<<that xxx.jpg must be in the same directory with file.java
    but now I want to load picture by directory of that picture
    sample : ImageIcon c = new ImageIcon("D:\Eclipse\Project\xxx.jpg");
    and It has some problem about compiler, I want to know code that use for upload pic by directory
    someone plz help me :'(

    OrImageIcon c = new ImageIcon("D:/Eclipse/Project/xxx.jpg");Care should be taken if you think you might want to put the application
    into a .jar file. If the image resources are going there too it would be
    better to use a relative path rather than an absolute one.

  • Problems using CFFile to move files

    Hi there - I am having some problems using CFFile to move
    files from one directory to another. It only seems to only move
    some of the files in the group that I choose to move over, and
    there is nothing specific about which files are moved - different
    files are moved each time. There are no error messages that are
    showing up, so I am totally baffled. Has anyone else experienced
    this or does anyone else have any ideas on how to fix this problem?
    Any help would be much appreciated!! My code is below.

    First, an incidental matter. I don't think there's any need
    for so many try-catch tags. I would expect all the tags <cffile
    action="move"> to throw the same class of exception, and so
    would use one try-catch for them all. Even if you expect different
    exceptions to be thrown, one cftry tag might still be sufficient,
    if implemented as follows
    <cftry>
    <!--- code block 1 --->
    <!--- code block 2 --->
    <!--- ... etc... --->
    <cfcatch type="exceptionType1"></cfcatch>
    <cfcatch type="exceptionType2"></cfcatch>
    <!--- ... etc... --->
    </cftry>
    I suspect the cause of the problems lies in the dynamic
    values that you give the attributes. Perhaps incorrect values are
    passed for the source and/or destination values in certain
    circumstances. As A3gis has said, if that were to happen you
    probably wouldn't notice, because of the try-catches. Find a way to
    ensure that all the generated values for source and destination are
    correct.

  • How to respecify the fixed path when use  mm01 to upload the attachment

    Now I'm need to upload some pictures to the material when I use the transcation MM01, but I don't know the default path ,  I guess it appoint the the database directory,
    I want to respecify the path, Can anybody tell me the detailed solution
    Thanks a lot.

    Hi ,
    you can use the .dtprofile under the home directory of each user to set the PATH variable for the users. To set the PATH for the root, you can also use /etc/profile. For each user you can also use .login
    (for csh shell) and .profile(for sh & ksh shells) under their home directory to set the path variable.
    regards

  • I am getting a error IO when trying to upload multiple images within wordpress using the flash uploader. I do not get the error when uploading using explorer. The error only appears if I try uploading using firefox....any ideas?

    I am getting a error IO when trying to upload multiple images within wordpress using the flash uploader. I do not get the error when uploading using explorer. The error only appears if I try uploading using firefox....any ideas?

    Logged the call with SAP who directed me to 'Define settings for attachments' in IMG and setting the 'Deactivate Java Applet' & 'Deactivate Attachment versioning' checkboxes - problem solved.

  • How can I use aperture after receiving the full adobe suite? It won't allow me to use it.

    How can I use aperture after receiving the full adobe suite? It won't allow me to use it. I receive a dialogue box which states previews are not allowed in  aperture and the application is shut down.

    Aperture is Apples version of Lightroom. This has nothing to do with Adobe. Ask on a Apple forum. You won't find many people here using this program.
    Mylenium

  • PS CS6 has a different set of installed fonts than my old PS CS4.  How do I get my old fonts back?  Don't like most of the CS6 fonts.  Dell Precision, Windows 7.  Does PS use the fonts in the Windows directory or does it use its own?  A lot of my preferre

    PS CS6 has a different set of installed fonts than my old PS CS4.  How do I get my old fonts back?  Don't like most of the newer CS6 fonts.  Dell Precision, Windows 7.  Does PS use the fonts in the Windows directory or does it use its own?  If so, where are they in the directory?  A lot of my preferred fonts show in the Windows directory but not in Photoshop, which does not display them within the program.  Please help.  If I get free fonts (NOT CC fonts) from elsewhere, where do I put them for Photoshop[ CS6 to use them?  Thanks.

    All versions of Photoshop get their fonts from your OS.  Just install any missing font wherever Windows keeps fonts.
    I don't do windows myself.

Maybe you are looking for