logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: [drupal-devel] Trying to get new file API to work: msg#00085

Subject: Re: [drupal-devel] Trying to get new file API to work

On Mon, 26 Jan 2004 roger-drupal-devel@xxxxxxxxxxxxxxxx wrote:

> Hi,
>
> I'm trying to get the new file API to work (in particular with
> filestore.module).

Sounds like a support question. Please use drupal-support@ for this.
Please respect the reply-to.

> I've got an installation of drupal from CVS HEAD on my test box, and I'm
> trying to use the new fs.module stuff to upload files.  I've grabbed what I
> think are the correct files (also from CVS HEAD) from
> contributions/sandbox/marco/fileapi, but I'm having trouble installing them.

They might be a bit outdated. Drupal now supports file uploads
natively through file.inc. Most modules have not yet been converted to
take advantage of it, though.

> I _think_ that I've followed the instructions in fileapi.README correctly,
> namely:
>
> 1) updating the database using fs.mysql
> 2) creating the _files and files directories in 'misc'.  They're writable by
> the webserver -- this much appears to be working, fs.module has created a
> bunch of m/z-style directories in there.
> 3) Copying the fs.module file into (in my case) /var/www/drupal/modules
>
> I'm stumped by the instruction to 'patch common.inc', though.  With what?
> There are several 'common.diff' files in sandbox/marco, but none in the
> fileapi directory.

IIRC the patch wasn't neccessary anymore. Just make sure to call your
form like this:

  $form = form($form, 'post', 0, array("enctype" => "multipart/form-data"));

> Anyway, if I then enable the module, it adds itself to the
> 'configure/modules' menu, and I can set the configuration there.
>
> I'd like to use the 'filestore' module to upload/download my files, because
> I'm not (at this point) planning to attach them to any pages of content.  I
> can't get this to work (more on this below).

You should maybe have a look at Gordon's filestore2 module (in his
sandbox).

Cheers,
        Gerhard

-- 
[ Drupal support list | http://list.drupal.org/ ]




Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>