Append ".tmp" file extension to files, uploaded in temporary table

Components

Labels

Description

Due changes made in information about uploaded file isn't available for validation purposes before object is saved to database.

Because of that it's impossible to get name of uploaded file and therefore check if file was uploaded at all. This results in "Field is required" error being displayed all the time preventing form submission at all.

Context Information

None

Additional information (do not use)

None

Attachments

2

Activity

Show:

Alex July 20, 2015 at 11:14 AM

Closing issues from released versions.

Alex May 13, 2013 at 8:42 AM

After a while I've noticed, that preview images are not showing for case, when you:

  1. upload an image (preview is visible)

  2. save record

  3. open record (no preview)

Patch "live_preview_image_not_showing_fix.patch" fixes that.

Dmitry Andrejev April 23, 2013 at 9:28 AM

User committed a fix to 5.2.x. Commit Message:

Fixes - Impossible to validate files, uploaded with Flash Uploader

Alex April 23, 2013 at 9:27 AM

Dmitry will test all together later.

Alex April 19, 2013 at 3:43 PM
Edited

Additional issues found and fixed along the way:

  1. when file, that was uploaded was already present in "/system/tmp/" folder, then it was renamed to prevent collision (correct), but preview link created was leading to broken page (incorrect)

  2. 'direct_links' option (of upload formatter) in field configuration was 'false' by default resulting in 'full_url' format producing file links wrapped with OnViewFile event, which in turn (when user clicked that link) produced a broken image (before it was fixed by a $force_direct_links hack)

What was done additionally:

  1. $force_direct_links hack removed from kUploadFormatter class

  2. 'direct_links' option is now 'true' by default unless user needs to use OnViewFile event in specific cases

  3. added 'raw_url' format, that always returns direct url to a file regardless of 'direct_links' option set in field configuration

  4. added 'display_name' format, that removed ".tmp" extension, when there is a need to display clean filename somewhere during item editing, but before it was saved to live

Fixed

Details

Priority

Assignee

Reporter

Developer

Reviewer

Change Log Group

Change Log Message

Patch Instructions

Patches must be submitted through Phabricator.

Story Points

Fix versions

Affects versions

Created April 12, 2013 at 3:17 PM
Updated April 14, 2025 at 7:29 AM
Resolved April 23, 2013 at 9:28 AM