Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

Review pathing functions #14

Closed
davidyell opened this issue Nov 26, 2014 · 6 comments
Closed

Review pathing functions #14

davidyell opened this issue Nov 26, 2014 · 6 comments
Assignees

Comments

@davidyell
Copy link
Owner

Need some method which will return,

  • A full path name to the folder
  • A complete filename with and without prefix
  • Component parts of the path
@davidyell davidyell self-assigned this Nov 26, 2014
@davidyell davidyell modified the milestone: Release version 0.0.1 Nov 26, 2014
@davidyell
Copy link
Owner Author

Should probably come after #16 so that I know nothing is broken or regressed.

@davidyell
Copy link
Owner Author

Need to think about multiple file uploads.

The config exists to allow multiple upload fields per model, but the pathing doesn't. So it'll need to understand some use-cases.

  • User is uploading the same image into two different fields in the same Table
  • Different images into different fields

Does the path need to be a different UUID for each file? Or include the field in the path?

I think it's best to include the field in the path, to help differentiate different files uploaded to the same table.

@davidyell
Copy link
Owner Author

Why does _buildPath() take $field, $entity and also $entity->get($field)? Surely the last argument can be removed and processed inside the method.

@davidyell
Copy link
Owner Author

Sounds like it needs it's own class. So that an instance of the ProfferPath or something can be created and passed around, with various accessor methods.

@davidyell
Copy link
Owner Author

Started work in the features/pathing branch

@davidyell
Copy link
Owner Author

Completed.

This was referenced Nov 28, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant