View more context

 

webbower

For a recognized module, do you need at least one yaml file in the _config dir or can you just have an empty _config dir?

bummzack

I don't think it's still a requirement… at least not for modules you install with composer and that are declared as silverstripe-vendormodule

bummzack

An empty _config dir should be enough though for a module that isn't installed via composer

webbower

This would be a custom submodule. Thanks

Rosanne McKinstry

Problems now with the csv upload which kind of works, kind of doesn’t:

Files: Requires logging in with Slack to view/download
AnnouncementsCsvBulkLoader.php
Rosanne McKinstry

When we Upload files with the normal file uploader, it puts each file in a unique random folder name. Import via CSV upload with our code adds a “-v[n]” on the end of the filename so we can’t find the file we previously uploaded. What is going on????

jakx

@Rosanne McKinstry SilverStripe's filesystem stores files in hashed folders, it also natively finds files stored in those hashed folders. When a developer is creating & retrieving a file, they can usually ignore the hashing, because all the considerations are done for them, as long as you use the File API.

SilverStripe's filesystem also has versioning, so that's where the -v[n] is coming from.

Sadly, mapping a plain filename uri/url is kind of flimsy, and I suspect you could be experiencing that 🙁 , which must be frustrating. Ideally you would relate your Accouncement to a FileID, so that the Announcement object can reference the file's URL through SilverStripe's file system.