Closed vizvamitra closed 7 years ago
@dmitry-mukhin,
Setting :autostore
to true by default feels strange for me. Consider this:
UPLOADCARE_STORE
http param is not provided in an upload request) is equal to setting UPLOADCARE_STORE=0
UPLOADCARE_STORE=1
"Requires “automatic file storing” setting to be enabled", otherwise you'll receive [HTTP 403] Autostore is disabled
in response. So if we'll set the default to true
than some users will receive errors because their projects has autostore
setting set to disallow
.Are you sure?
of course you're right. we need to default this to "auto".
@dmitry-mukhin before this update the default behaviour of the #upload
method used to be "don't store files". If i'll set default to auto
then those ho have autostore setting allowed will get their files stored by default, others will get them not stored. "Do not store" will change to "Store according your project settings". Is it ok?
As I've said earlier it's ok if we change major versions and write about this potentially breaking change in changelog.
@dmitry-mukhin seems that I've made all requestd changes. Note the change in spec/resources/file_spec.rb, it reflects the change in a default behaviour
@dmitry-mukhin it looks that there are some heisenbugs in Uploadcare::Api::File tests (example). Don't merge this PR untill I'll find the reason
@dmitry-mukhin please note my changes in the last commit. If you are ok with them, we can finally merge this PR
@dmitry-mukhin I've thrown out caveats
section from readme and fixed changelog. Approve please
Now gem users can define wheather to store their files on upload.
This could be done in two different ways: either setting global
:store_files_upon_upload
option or setting:store
option on each upload request.Also: