Ticket #882 (closed Enhancement: duplicate)

Opened 5 years ago

Last modified 5 years ago

dm-files: storeFile same as with getResourceInfo

Reported by: Malte Owned by: jri
Priority: Major Milestone: Release 4.8
Component: DeepaMehta Standard Distribution Version: 4.7
Keywords: Cc:
Complexity: 3 Area:
Module: deepamehta-files

Description

When trying to store a file into a subfolder of my repo, the global file repo is used (despite per_workspace repos are ON):

StoredFile file = fileService.storeFile(image, "/images");

leads to:

Nov 11, 2015 12:22:39 PM de.deepamehta.plugins.files.FilesPlugin storeFile
INFORMATION: Storing file "tumblr_nqz7iaCoHh1qz7lxdo1_1280.jpg" (image/jpeg, 145073 bytes) at repository path "/images"
Nov 11, 2015 12:22:39 PM de.deepamehta.plugins.files.FilesPlugin checkPath
INFORMATION: Checking path "/home/malted/Schreibtisch/filerepo-test/images"
  dm4.filerepo.path="/home/malted/Schreibtisch/filerepo-test" => PATH OK

This means, currently, to store a file in the correct filerepo, plugin developers must check a) the per_workspace flag and b) inspect the "dm4_workspace_id" cookie.

Would be great if the dm4-files plugin could serve other plugin developers in doing so.

Change History

comment:1 Changed 5 years ago by Malte

  • Summary changed from dm-files: createFile same as with getResourceInfo to dm-files: storeFile same as with getResourceInfo

Changed title of ticket from "dm-files: createFile same as with getResourceInfo" to "dm-files: storeFile same as with getResourceInfo", cause i haven't actually checked the createFile()-call.

comment:2 Changed 5 years ago by Malte

  • Status changed from new to closed
  • Resolution set to duplicate

Sorry, this issue is in fact a duplicate of #879.

Note: See TracTickets for help on using tickets.