Closed (fixed)
Project:
iTweak Upload
Version:
6.x-2.2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Feb 2010 at 12:22 UTC
Updated:
14 Oct 2011 at 16:31 UTC
Jump to comment: Most recent file
Comments
Comment #1
iva2k commentedI'm not sure that I understand the problem and the feature requested. For the problem - can you list a step-by-step, expected and actual behavior. For the feature request - I want to see use case (if its different from the problem).
Also, did you check this issue #510730: filefield support if it is a duplicate?
Comment #2
iva2k commentedNo activity for more than 32 weeks, and this is not a filefield module, so closing as bug/cannot reproduce.
Comment #3
ryanilg commentedI hate to reopen old topics but this is actually pretty easy to reproduce... It would be super handy to make this work. Yes iTweak is not a FileField module, but FileField Paths actually has path settings for both CCK Filefields as well as files uploaded via the default Drupal uploads module.
1. Install FileField Paths
2. Install iTweak Upload
3. Set a path for all file uploads on a specific content type. Located under Workflow Settings on /admin/content/node-type/[content-type]
For example, attachments/[type] will upload all files into /sites/default/files/attachments/page for page content type.
4. Create a new page and upload a file via Attach/Upload fieldset.
The file path displayed under the uploaded file displays the name of the file, along with whatever the path setting is in File System (files folder).
It does not seem to take into account the settings set by FileField Paths on first display, but when you save the page, and re edit the page, it loads the actual file path from the database.
It just sucks because on first upload of the file, it shows the wrong url, so you have to save, then edit again to copy the correct path into the "Body" area if you want to link to the file.
This should actually be an easy fix, as it could just check for the presence of the FileField Paths module, if it exists, gets the prefix for the currently edited content type and insert it between the filename and default upload path.
Comment #4
markhalliwellI'm actually interested in this topic because I have the same problem. I remember seeing this issue in the FileField Paths issue queue at one point but don't have the time to searching right now. From what I gathered though, the issue is because when you have a new node, there is no
nidestablished yet. So if your FileField path uses that token or anything related to it (say Path aliases), you're SOL until it's created first.Once the node is saved, then the correct paths are shown of course. What would be interesting to see is if we could find a way to dynamically do a regex search in the body for the files once the new node is saved. Although I'm seriously tempted to say this is more of a FileField Paths issue at that point (part of it's retroactive updating maybe?)
Comment #5
rbrandon commentedSubscribing, I would be interested in this too.
Currently I have a patch that makes the itweak_upload thumbnails part of the node object and then use a ugly string replace in nodeapi to replace the paths.
Comment #6
rbrandon commentedAttached is a second patch which addresses the display of files in the node or teaser, it checks if filefield paths is installed and if it is and a path alias exists it uses that instead.
If this could be included it would be a good enhancement, with no drawback.
Thanks,
Richard Brandon
Comment #7
iva2k commentedThanks everyone for the information and @rbrandon for the patch.
I have little bandwidth to do testing myself. Can people review and post here - does it solve the issue? Are there no side effects? Also, what if both filefield_paths and private_upload modules are active?
Comment #8
iva2k commentedNo activity for over 4 weeks - consider the issue fixed. Please reopen with detailed explanation how to reproduce if the issue still persists in 6.x-2.x-dev.