[Fusionforge-general] Fusion Forge Attachment Storage

Hough, Kenneth P kenneth.phough at WPI.EDU
Fri Jul 27 15:34:14 CEST 2012


Hi All,

I'm working on migrating attachments from another forge system to fusion forge and am having trouble downloading the migrated attachments.

I wrote a script that uses the Artifact class and ArtifactFile class to upload the attachments like so:
$af = new ArtifactFile(artifact_get_object($fforge_art_id));
$af->create($filename, $type, $size, $file, $description, array());

The upload goes fine, and I see entries in the database table artifact_file that are associated to the correct entries in the artifact table.
However, when I login to Fusion Forge and navigate to one of the attachments in an artifact I get nothing.  For example if I click on test.png I get a new tab with a red X indicating bad reference to image (for example if you link an image in a web page that doesn't exist).

My initial understanding was that the directories created in data_path are the IDs from the artifact_file table, and the actual file is stored with filename '0'.

<data_path>/<artifact_file_id>/0

I also see this with the download link

https://somehost.example.com/tracker/download.php/<project _id>/<artifact_group_id>/<artifact_id>/<artifact_file_id>/<filename>

But after a few uploads and more testing, I noticed that the directories in data_path are now different from the artifact_file_id

Below are examples of some of the directories and filenames I get:

<data_path>/4f/1
<data_path>/d9/1
<data_path>/de/1
<data_path>/e3/1

If I upload an attachment through our fusion forge website, the upload goes fine and I can download the attachment as well.  However the directory and filename created are like the example shown above (i.e., <data_path>/e3/1)

I checked to make sure that none of the files were corrupt.  I can read them and they are indeed the files I uploaded/migrated.

Does Fusion Forge have another table mapping the directories to the files in the database? I can't seem to find any tables that suggest that. Should I and is there a way to reset the directory naming sequence?  Any help is much appreciated?

Thanks,
Ken

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fusionforge.org/pipermail/fusionforge-general/attachments/20120727/fb021793/attachment.html>


More information about the Fusionforge-general mailing list